0
how to create fixed navbar
How to create fixed navbar which mustn't scroll down while it reaches to selected position
4 Réponses
+ 9
you can try follow this example for a sticky navbar (tho i wouldn't recommend using it for anything serious)
https://code.sololearn.com/W7q5hsYxi3NN/?ref=app
and the github page
https://github.com/wilddeer/stickyfill
edit:
there's also stickyBits
https://github.com/dollarshaveclub/stickybits
https://css-tricks.com/stickybits-alternative-position-sticky-polyfills/
+ 2
W3schools has an example of that, although I'm not sure this is what you mean:
https://www.w3schools.com/howto/howto_js_navbar_sticky.asp
https://www.w3schools.com/howto/howto_css_fixed_menu.asp
+ 1
nav{
position:fixed;
}
but better not to use fixed
0
use nav tag inside header tag