CSS scrolling with fixed header
I'm working on a website conversion project. There's one element I'm having a bit of trouble with in relation to CSS.
Currently the site is "tall" meaning the user has to use the browser scroll bar to scroll down and see all the content including the footer.
The goal is to have the site header stay in a fixed position on the screen and have the user use a scroll bar within the content to scroll up and down, always having the header be fixed and visible on the top of the screen.
Is this a candidate for the "overflow" property? Or would I need jquery to do something like this?
Thanks for thoughts...
Just fix the header in CSS:
position:fixed; top:0px; left:0px;
Then for the start of the content set margin-top equal to the height of the header.
Wow, that looks a lot easier than I thought it would be.
Thanks a bunch!
FYI, this works except the margin-top needs to be padding-top.
|All times are GMT +1. The time now is 09:47 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.