I'm trying to set the site name/logo and the navigation on my page so that when it hits the top of the page, it stays there instead of disappearing off the top of the screen. I've tried position: fixed;
, but unless I'm missing somthing that is not what I need to do.
My layout is as follows, and it is header-top
and header-nave
that I wish to not disapear off the top of the page -
<header>
<div id="header-top"></div>
<div id="header-middle"></div>
<div id="header-nav"></div>
</header>
Does anybody have any tips on this, or know if it is even possible with CSS? Either way, some pointers to tutorials or even the method to use to do this would be helpful.
Am open to JS if that is what is needed. Thanks.