How to stop menu bar on the top while scrolling up the webpage? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to stop menu bar on the top while scrolling up the webpage?

when we scroll webpage up then menu bar also scroll with page, but i want to stay menu bar at the top when scrolling the webpage?

9th May 2018, 12:59 AM
Mr. Jay Koranga
Mr.  Jay Koranga - avatar
4 Answers
+ 2
try position: fixed
9th May 2018, 1:25 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
with fixed rest of the content gets overlapped when scrolling. (At least when i tried) Try using sticky).
9th May 2018, 2:04 AM
Akib
Akib - avatar
0
It sounds like you want the menu bar to NOT scroll with the rest of the page.... in this case try using position: absolute In your menu’s CSS.
10th May 2018, 10:02 PM
Your Friend
Your Friend - avatar
0
Let me know if that works for you :)
10th May 2018, 10:11 PM
Your Friend
Your Friend - avatar