Hey, I just want to thank whoever looks at this in advance for helping me address this issue because I’ve been staring at it for the past couple hours trying to find a fix
So, when doing these projects I usually copy and paste the instructions into the top of Codepen’s HTML editor before and then comment it out. When doing this I accidentally made an error where instead of using :<!-- --> tags I input .<!-- -->
However, this extra period before my comment tag is allowing the “margin: 0 ;” command that I input into my body element to function as intended:
Below, I will copy and paste the URL for the project on Codepen since I think it’s easier to look at than inputting code blocks. But if whoever’s looking at this would prefer the code blocks format. Please let me know! Thanks again!
What do you mean by that? Do you mean you couldn’t recreate the second screenshot where there is empty space using between the header and the webpage using my code ?
I don’t know why the ‘.’ at the start makes it function, but anyway I found the “problem”:
.container {
width: 100%;
margin: 3.125rem auto 0 auto;
}
Your div which contains the header, has the class container, and you have a top margin on that class. Remove it or make a new class if it’s used elsewhere.
.container {
width: 100%;
margin: 0 auto 0 auto;
}