Cannot make the Top navigation sticky

Cannot make the Top navigation sticky
0

#1

Hi

I am trying to do the project “Personal Portfolio” and I am trying to make the top navigation menu sticky. I have tried:

position: fixed;

When i insert this line it breaks the code. What am i missing?


#2

Hi, you’re almost there.
One more thing you need is set top property to 0.

Good luck


#3

Hi. When i insert:

top: 0;

I get this:

However, it should stick to the top-right corner like this:


#4

You can give

right:0;


#5

After inserting:

right: 0;

I am getting this white space behind the menu. I want it to be in the same container as the blue background.


#6

It should work like this: https://codepen.io/freeCodeCamp/full/zNBOYG


#8

Change the margin-top to padding-top in your .intro class

Rather than using padding to take it down, you can add a height of 100vh to your .intro and you already have flex there, just make it to position center using justify-content


#9

Thanks a lot. That worked correctly.