Number 11- The navbar should always be at the top of the viewport, is failing and I don’t know why?

It’s last project of Responsive Web Development, I will go on to make it prettier, but not with a failed story.

Thanks in advance!

The tests want the <nav> element to have fixed positioning, not the <header> element.

1 Like

I thought as the < nav > was under the < header > element it should work, but turns out I was wrong. Thanks!

I thought position is computed value, so it should be inherited by children of the header

Inheritance - CSS: Cascading Style Sheets | MDN (mozilla.org)

position - CSS: Cascading Style Sheets | MDN (mozilla.org)

1 Like

Ya, it’s just the way the test is implemented, the positioning needs to be on the <nav>. Putting it on the <header> is a perfectly fine way to do it, just not for this particular test.