Newbie - Please help me fix Bootstap navbar to top of screen

Hi everyone,

I’m just working on my portfolio project. I’m trying to fix the bootstrap navbar to the top of the screen.

After reading the documentation, I added the class “navbar-fixed-top” but it still disappears when I scroll down. Here is my Pen:

Can anyone please explain to me what I’m doing wrong? I know I could figure out how to fix the bar manually using my own CSS, but I’m trying my best to learn how to use bootstrap’s built-in rules as much as possible so I understand it better and I don’t have to write a bunch of unnecessary rules myself.

Thank you!

You’re using bootstrap 4.0. so look into that

Insted of navbar-fixed-top use just fixed-top

1 Like

@jmsm16 @lfaudreejr Thank you both!