I have built a page with a fixed header that always stays on top of the page. The page has a background picture and the header is transparent.
My basic layout:
<div id="header-container">
<header class="wrapper">
<h1 id="title">Headline</h1>
</header>
<nav id="main-navigation" class="wrapper">
<ul>
<li><a href="#">Nav Item</a></li>
</ul>
</nav> <!-- #main-navigation -->
</div> <!-- #header-container -->
<div id="main-container" class="wrapper">
<article id="main">
<section class="content">
<h2>some headline</h2>
<p>content stuff</p>
</section>
</article> <!-- #main -->
<footer id="footer">
footer stuff
</footer><!-- #footer -->
</div> <!-- #main-container -->
And this is the most important css:
#main-container {
margin-top: 150px;
}
#header-container{
height: 150px;
top: 0;
position: fixed;
right: 0;
left: 0;
z-index: 1030;
}
Here my jsfiddle: http://jsfiddle.net/0xsven/RBnHt/
When I scroll the site down I want the #main-container's underflow (below the header-container) to be hidden (somehow like a reversed overflow:hidden).
How do I accomplish that without changing too much on the layout side?