+ 3
How to make a sticky nav bar
I was making a nav bar and I want it to remain on the page while scrolling I want to know how I can do it.
8 Respostas
+ 3
Set position to sticky
or check out this example
https://code.sololearn.com/WWvUQyEnohm5/?ref=app
+ 4
position:fixed;
+ 3
use position fixed /sticky
+ 2
Lily Mea
I have a header/logo above the nav bar, so when I use it, it does not remain on top
+ 1
Hi,
You can use css property position is equal to fixed.
example:
.classname{
position:fixed;
}
Refer following:
https://www.w3schools.com/howto/howto_js_navbar_sticky.asp
+ 1
https://code.sololearn.com/Wbat8raAIZ2R/?ref=app
0
Mrityunjay🇮🇳 you can wrap your nav and header/logo in a div. Then apply Lily Mea said
0
use position fixed and relative