Personal Portfolio - Navbar at the top of viewport?

Hello,

I would like to fullfill userstory 3 #Layout - The navbar should always be at the top of the viewport. .

I have given my #header the position of fixed and top: 0; ( also tried the same on #navbar ) but
it still doesn’t appear as on top of viewport.

What am I missing here?

My pen: https://codepen.io/nenna_e/pen/RwNQPax?editors=1100

What you have it functionally correct. But the test is looking at the stack ups of your padding & margins (thats why you’ll see expected 60 to equal +- 15)

try:
<header class="header" id="navbar"> for your header.
You’ll need to remove the id="navbar" from the <nav> and make your CSS match the new .header but that will get you close. Then you just gotta figure out where those extra 30px at the top are coming from :wink:

I made it! Thank you :slight_smile: !

1 Like