Design comparison
SolutionDesign
Community feedback
- @AGutierrezRPosted over 1 year ago
Hello there 👋. Good job on completing the challenge!
I have some suggestions about your code that might interest you.
-
You could create a container to limit the
max-width
of the content to let’s say1140px
<header> <div class="container"> ... header content ... </div> </header> <main> <div class="container"> ... main content ... </div> </main>
You have a
.main-container
class that you could modify in order to use it in both scenarios:.container { width: 100%; max-width: 480px; padding-left: 16px; padding-right: 16px; margin: 0 auto; } @media (min-width: 1280px) { .container { max-width: 1140px; } }
And inside this .container you could use an element for your grid layout. The
padding
s will prevent the content to touch the sides of the screen in smaller viewports.
I hope you find this helpful 😁. Most importantly, your submitted solution is fantastic!
Happy coding!
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