Design comparison
Solution retrospective
How do I apply the media query in CSS to make my designs responsive?
Community feedback
- @stephenikuomolaPosted over 2 years ago
-
You need to give your text a particular font-size.
-
You can also check the
<div class="annual"></div>
and make that container to have adisplay:flex
. Also set the annual class to be a percentage of the card as well and add margin left and right to have a margin of auto. -
You can also set the width of the button to be a percentage of the card and make it have a margin left and right of auto. That way the button will be responsive.
-
I DO NOT think you need to set the
<main>
tag to have a width of 50% as that will make the card to shrink in width as the viewport decreases.
I think that is all for what might be giving you problems in terms of the responsiveness.
Happy Coding David Adenusi!!!!
0 -
- @jgreen721Posted over 2 years ago
Just cite this at the bottom of your CSS
media screen and (max-width:550px){ .property1{ width: ... }; .property2{} }}
550px is just an example. Also there is (predictably) the option of min-width as well. Make sure there is the whitespace between 'and' and the '(' as otherwise, I believe it doesn't work.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord