Your #navbar element should always be at the top of the viewport

Hi everyone.
I’m a two steps shy from finishing the HTML and CSS course.
The one that got me stuck is the one in the title. I’ve looked up for help in the forum and on Google. It’s driving me nuts.
I plan to stylize my code after I solve this and all the items in the Tests section are marked as passed, but in the meantime, this is it:

<nav id="navbar">
<li><a href="#projects">My Projects</a></li>
<li><a href="#contact">Contact</a></li>
</nav>
navbar {
  position: fixed;
  top: 0;
}

This won’t work out and I’ve run out of ideas.

Thank you all in advance.

Is this all of your code? Where are you linking that CSS to the HTML?

Oh man. I’ve found the problem and you wouldn’t believe it, my code was missing the <link rel="stylesheet" href="styles.css"/>
As long as it wasn’t in the code, the css styling was never going to be taken in consideration, hence, it wouldn’t recognize the #navbar instruccions.

So sorry! Thanks for replying tho :slight_smile:

1 Like

I literally just realized I did the same thing. :upside_down_face:
Thank you for pointing it out seriously…i have been stuck for hours on one step. LOL

1 Like