Design comparison
SolutionDesign
Solution retrospective
When I check on the browser the mobile version looks good, but when I send the ZEIT now link to my mobile phone its off-center - not sure why
Community feedback
- @mattstuddertPosted over 4 years ago
Nice work on this challenge, Anthony. The issue with your mobile layout is due to a couple of things:
- You're setting
width: 400px;
on theheader
. So this is staying at400px
even if you're on mobile phone with a smaller screen size. One workaround would be to addmax-width: 100%;
to the element which would make sure it never grows to more than 100% of the browser window width. - Another issue is that you're not setting the
box-sizing
on all elements to beborder-box
. That means you're using the old W3C definition of the box model wherebypadding
andborder
values are added onto thewidth
of an element. It's standard practice to set all elements on the page to be sized by theirborder-box
. Here's a great article on CSS Tricks for more information on this.
Hopefully, that will help you resolve the issue on mobile. Keep up the great work and let me know if you have any questions 🙂
0@anthonyPasslerPosted over 4 years ago@mattstuddert thank you so much for the feedback - very kind :)
0 - You're setting
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