Your #nav-bar should always be at the top of the viewport.?

I’m doing Build a Product Landing Page and it says “Your #nav-bar should always be at the top of the viewport.”

I couldn’t figure it out. can anyone help me ?

1 Like

Use position: fixed;

header {
  position: fixed;
  top: 0px;
}

Hi @cjh8710 !

When you get ready to submit this project, you will need to copy all of your html and css code into the new fcc editor since codepen links will no longer be accepted.

You will also need to link the css to the html document

<head>
  <link rel="stylesheet" href="styles.css">
</head>
1 Like

I tried… but still not working

I did this but still shows “Your #nav-bar should always be at the top of the viewport.”

The issue is with the padding in the header.

header {
  position: fixed;
  top: 0px;
  width: 100%;
  height: 19px;
  padding: 25px 0px;

remove it and it will pass

Thank you very much for your answer, I do have a “s” character missing from “styles”.