how to create fixed navbar | Sololearn: Learn to code for FREE!

0

how to create fixed navbar

How to create fixed navbar which mustn't scroll down while it reaches to selected position

6/18/2018 4:35:01 PM

Fury

4 Answers

New Answer

+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