Design comparison
Solution retrospective
first project i've completed. any suggestions are helpful :)
Community feedback
- @redstar504Posted 12 months ago
Hey, great job!
One small nitpick, your solution has a scroll bar even though the page should not be scrollable.
Try this trick, rather than using
height: 100vh
on the body.html { height: 100%; } body { min-height: 100%; }
Keep your flex styles on the body, and it should still center your content and eliminate the scrollbar. This is a trick from way back in the day before we had viewport size units. It still works better now for things like this too ;)
Regards, Brayden
Marked as helpful1@redstar504Posted 12 months agoSorry, I forgot to mention, you will also want to add
margin:0
on the body as well. You should consider using a reset boilerplate to undo all of the browser defaults before applying your own styling. It would take care of this by default.See the reset at the top of my stylesheet here for a good starting point.
Marked as helpful1
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