Possible Duplicate:
How do I make a Div move up and down while Scrolling the page?
I want to do a 100% width header navigation that stays anchored to the top of the site even when the user scrolls vertically. Kind of like this site:
I would google it but I can’t come up with the correct term.
So what is the easiest way to do this?
Simply set the header’s position to fixed:
Here’s the fiddle: http://jsfiddle.net/M9RHn/
P.S. Remember to offset your page content from the top, so that the header does not cover any content before the user starts scrolling.