Recipe page using HTML and CSS

Solution retrospective
I have some problems making this responsive for mobile, any help would be really appreciated guys!!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Zukizuk
Hello there
Your solution looks nice
I have few suggestion that i think might interest you.
You can make it responsive by using media queries like you did but use this instead
@media only screen and (max-width: 480px) { /* Media query styles */ }
The max-device-width targets the device's screen width, and it might not work as expected for all devices. Instead, use max-width to target the width of the viewport.
Better still you can start by doing the mobile design first and using media queries for the desktop(mobile first approach) which is also a good practice in writing you styles.
@media (min-width: 64rem) { /* Desktop styles */ }
Also put this
*{ margin: 0; padding: 0; }
at the very top of your css not in the media queries. You need it in both mobile and desktop version.
Again, consider using semantic html like
<main></main>
for the div with the class main.Marked as helpful
Join 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