Design comparison
Solution retrospective
How do I achieve the mobile responsive view? I tried some media query, but it didn't work.
Community feedback
- @GerbenDolPosted over 4 years ago
Hey Peter! Simply setting a width of
100%
won't usually do the trick. 😬What I'd suggest is:
- Start with the mobile layout, because divs are 100% wide by default anyways
- Add media queries with a
min-width
for when they need to switch to a layout with columns and add the required code (I agree with @VegaYed about looking into grid or flexbox) to make those!
This way you won't have to reset any of the code you added for the more complex layout. This is called mobile first, something you might also want to read or watch more about! 🤓
0 - @osvaldoleivaPosted over 4 years ago
Hi Peter I recommend you learn about CSS layout like Grid layout and flex layout those topics will answer all your questions https://www.frontendmentor.io/resources here a free sites to learn about those topics, I hope this will help you(sorry my bad english)
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