HTML
<div id="header">
<ul id="nav">
<li><a id="ho" href="#spread1-anchor">Home</a> /</li>
<li><a id="bg" href="#spread2-anchor">Background</a> /</li>
<li><a id="ap" href="#spread3-anchor">Approach</a> /</li>
<li><a id="se" href="#spread9-anchor">Services</a> /</li>
<li><a id="cl" href="#spread10-anchor">Clients</a> /</li>
<li><a id="co" href="#spread11-anchor">Contact</a></li>
</ul>
</div>
<div id="container">
<!-- Very wide horizontal scrolling content-->
</div>
CSS
#header {
width: 100%;
position: fixed;
top: 0;
left: 0;
}
#container {
width: 8000px;
height: 590px;
/*etc*/
}
Using the above code, I have a very wide #container
that scrolls horizontally, using ScrollTo.js. And the #header
that controls it is in a fixed position, as I don't want it to scroll with the rest of the page/container. My problem is, that if you resize the windonw vertically, the container hides underneath the #header
due to it fixed position.
Can the #header
be fixed horizontally, but still scroll vertically? Using jQuery or CSS?
My live example is here: http://www.kargo2.com/Stackover/
Thanks.