Problem with the navbar

Hi everyone,
On my landing page, it seems like everything on my code is correct, but I only succed in 15 out of 16 at the test. My navbar seems to be the issue but I don’t know what to change.


Inspecting the error give back an interesting information:

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

In your case, the fixed element is the ul which is a child element of nav.
Header or none of its children is at the top of the viewport.

So you need to change slightly your css/layout to be compliant with the test, I am afraid.
But be sure that the change is very minimal :wink:

Hope it helps.

Seems to me that my navbar is at the top of the viewport.
I noticed when I change the top-margin of my ul, the error changes from: expect 299 to be closte to… to expect 117 to be close to…
Do you know what those numbers mean?

it should be the distance from the top of the viewport of the #header or one of its children

Yeah I got it but the margin of the header in either situation : margin-top: 0px or margin-top:-15px doesn’t help me pass the test…

the margin and padding don’t bring the element upward, more something like position: fixed; top: 0px;

1 Like

Not really, the element with position: fixed is the ul, not the Navbar, that’s why the error.

Yes I got it complete since.