Personal Portfolio - 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.796875 to be close to 0 +/- 15
AssertionError: Navbar’s parent should be body and it should be at the top of the viewport **
My code actually does what is expected - keeps the “navbar” fixed at the top or so it appears. However, when I run the test, the above error pops up and it scores me 11/12. I already passed the test but my aim is not just to pass the test. I improved my answer by using display: grid to make it look better but now it no longer passes the tests.
Could someone examine the code and see where I am going wrong.
My code is shown below:
Thank you in advance.

https://codepen.io/Chiadika/pen/ExbjBzo

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36

Challenge: Build a Personal Portfolio Webpage

Link to the challenge:

Two things:

  • Please leave the FCC test suite in your project if you want people to help you with passing the tests.
  • Don’t put a top margin on the <nav> and you will pass. If you want to move the links in the nav down from the top of the browser then use top padding instead.

@bbsmooth
Thanks so much. I do not understand your first point - do you mean I paste error message from FCC test suite here too?
What solved my problem was replacing margin-top with padding-top.

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