Question:
How to pin the navigation bar/menu to always appear on the top of my website?
Ramy
2011-10-05 19:31:20 UTC
i'm a web designer & not very comfortable with coding (i can write html and css only). i'm looking for a piece of code (whether javascript / jquery / css or whatever else!) that enables me to pin my navigation menu bar on the top of the website, so it keeps appearing however the user scrolls downs and ups.
I mean something like that one in the facebook (which they recently added) or the one in myspace.

i tried the piece of code provided in this tutorial but i don't like the way it's shaking around while scrolling.
http://www.w3schools.com/dhtml/tryit.asp?filename=trydhtml_menu4

I'd appreciate if you can provide me with the right code. thnx =)
Three answers:
Emissary
2011-10-08 08:15:08 UTC








Nav bar example - CSS: position:fixed;






Header



Hello World! This box is tall enough to force the scroll bar for test purposes...

Please note that a doctype is required.



Raina
2016-03-02 01:49:44 UTC
My favorite NBA team - Knicks Favorite players 1) Tyson Chandler 2) Carmelo Anthony 3) LeBron James 4) Rajon Rondo 5) James Harden
?
2016-09-16 03:37:33 UTC
I had also asked this same question 3 times, and didn't receive an answer


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...