Root <html> element creating unwanted space before <body>
Answered
chan posted this in #help-forum
chanOP
I'm just barely learning frontend development and I'm having trouble with making my <body> tag taking the entire height of the page. It seems like hte Next.js generated HTML tag is creating space before my actual content and it's causing me a lot of frustration while styling. Can someone please explain what is going on and/or how to fix this? Thank you!
Edit: I already removed margin from every one of my CSS classes so I don't know what is causing this behavior.
Edit: I already removed margin from every one of my CSS classes so I don't know what is causing this behavior.
Answered by Toyger
add this style at top of your css file.
html,body{
margin:0;
padding:0;
}3 Replies
Toyger
add this style at top of your css file.
html,body{
margin:0;
padding:0;
}Answer
chanOP
I tried this maybe 30 minutes ago and it didn't work. Now it does ðŸ˜
thank you!!!!!!!!