Design comparison
Solution retrospective
I don't know why, when I put 100 vw and 100 vh to the main container, it creates the scroll bars
Community feedback
- @devsotterPosted over 1 year ago
"Hi, when you use vh and vw, you are setting the height and width in relation to the viewport size, if you go beyond the content area, scrollbars will be generated. In your case, there is padding on ".container-content" which is causing it to break and exceed the viewport. You can solve this kind of problem by using the "box-sizing: border-box;" property (I recommend looking into this). You can also remove the padding or use fixed measurement units such as px."
Marked as helpful1@jmanprojectsPosted over 1 year ago@devsotter Thanks, I'll check it to update the code
0 - @HK273Posted over 1 year ago
Nice job! Chuck this on the body tag to get rid of the scroll bars....
body { overflow: hidden; }
This will drop your footer out though so you may want to re-configure your html / other styles a bit if you want to keep the attribution div
Marked as helpful0
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