The navbar should always be at the top of the viewport. position: sticky

hello, ive used position: sticky to stop the nav bar moving but it doesnt seem to pass the tests. ive tried position: fixed but it sqeezes the whole nav bar. is anyone able to help ? :slight_smile:

additionally the webpage seems to run over in width is it possible to stop this from happening?

Hi @makslubax,

The fact you gave a negative value for the top property in your header selector makes the test fail:

header{
  position: sticky; 
  top: -30px;
}

It should be at the exact top if we can say like this, so try to change the value of the top property and it should pass.

1 Like

Your #banner has more width than the screen. Try change vw for %.

Your header should be at position: 0, is -30px now.

1 Like

thank you this worked :slight_smile:

thank you :slight_smile: it works now