Navbar's Parent Should Be Body

I’m new here and hope that I’m using this forum correctly.
I am having issues passing a test on the personal portfolio project. I’m failing this one: " The navbar should always be at the top of the viewport.

Navbar’s parent should be body and it should be at the top of the viewport : expected 27 to be close to 0 +/- 15 AssertionError: Navbar’s parent should be body and it should be at the top of the viewport"

And this is what my code looks like:

I don’t understand why navbar’s parent is supposed to be body.

Also, if you would like to give any other constructive criticism to my code, here is the link to it: https://codepen.io/ariwil1/pen/YzqjvRv. I know it’s not the best so I appreciate any helpful comments.

It’s the margin-top you have on the #navbar that is pushing the element too far down to count as being at the top of the viewport. Also, <navbar> is not a valid element, it should be <nav>.

I might suggest you just use the nav like you are using the header and put the heading and nav links inside it. You will need to change up a few things though to make it look like it does now.

1 Like

Thank you so much, that worked!