Can't figure out the last test - Navbar issue

I am trying to complete the last challenge in the Responsive Web Design course but have hit a snag. I can’t seem to get the last test to be completed. I had all tests passed before I started putting in the details and fussing with the CSS, and now it says that #11 isn’t complete.

User Story #11: The navbar should always be at the top of the viewport.

However my navbar is at the top? I poured over other people’s notes in completing this challenge and I can’t figure out what’s wrong with my code. Plz someone help.

1st - remove header element in html or u can add navbar id in header and give different id to nav element
2nd - move nav element to the top of the html element.
3rd - change header with #navbar in css box.
4th - change position of #navbar to sticky.
5th - change position: of #navbar in media query to sticky.

that’s it

@Peiko, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The failing message says

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 20.5 to be close to 0 +/- 15
AssertionError: Navbar's parent should be body and it should be at the top of the viewport : expected 20.5 to be close to 0 +/- 15

Do you understand what the test is looking for and why it is failing? (is navbars’ parent body?)

Someone has given you answers but you should be able to work through the issue by reading and understanding the entire failing message.

Thank you! just by changing the header element’s id to navbar fixed the issue.

Thank you for checking in. I only started learning a couple months ago and don’t understand a lot of things, most things, in coding. I did read the whole error message and still don’t fully understand it. I am still trying to figure it out so I can fix it in the future.

Always read the error logs and read it for at least 4-5 times(still not enough).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.