Product Landing Page #13

I have adjusted my header to position: fixed and it remains fixed but i am still failing the lesson. here is my code:

I appreciate any feedback also anything that isn’t related to my current issue! thank you!

Mozilla documentation:

position: fixed
The element is removed from the normal document flow, and no space is created for the element in the page layout.

This is why your main section moved up.
Give a height to your header section and then use position relative to make your main section move down correspondingly.
P.S There is no need for the body tag in codepen.

1 Like

Apparently your nav bar is not exactly at the top of the page… if you look under the test it tells you what is wrong:

#header or one of its children should be at the top of the viewport : expected 21.433334350585938 to be close to 0 +/- 15

It doesn’t tell you what the numbers exactly mean, but it says expected 21.4 to to be closer to 0… Likely meaning it expected the vertical position to be 0, but yours is 21.

I verified that is the reason you are not passing that test… if you can specify your header should be at the very top of the page it should work.

1 Like

ypu will need to specify that the header needs to be at the top, in your CSS there is nothing saying exactly that