hi there! 👋👋
You didn't do a CSS reset at the top of your CSS file, so your body
has 8px margin
on it, since you set a min-height: 100vh;
on body
it takes up the whole screen, but there's it's margin above and below it, and the margin causing the overflow and the scrolling. This is the default behavior of the browser, it's good practice to do a CSS reset when you start your project. This means you're overwriting these default values. I usually do a CSS reset like this:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*
is the universal selector
in CSS, my code sets every elements padding
and margin
to 0. Note that if you apply these now, you need to rearrange your entire layout.
Hope this helps 🙏
Good luck and happy coding! 💪
Marked as helpful