HTML:
<div id="mainWrapper">
<div id="headerContainer">Header</div>
<div class="contentPage">
<div id="content">
<p>Content Page</p>
<p>Content Page</p>
</div>
</div>
<div id="footerContainer">Footer</div>
</div>
CSS:
body {
height: 100%;
margin: 0;
padding: 0;
}
#mainWrapper {
margin: 0 auto;
min-height: 100%;
position: relative;
width: 100%;
background: red;
}
#headerContainer {
background: none repeat scroll 0 0 #4ED0AA;
height: auto;
width: 100%;
}
.contentPage {
background: url("http://www.sammt.net/Baum.jpg") repeat-y scroll 0 0 / 100% auto rgba(0, 0, 0, 0);
padding-bottom: 120px;
width: 100%;
}
#content {
background: none repeat scroll 0 0 #6288A1;
opacity: 0.8;
padding: 20px 20%;
}
#footerContainer {
background-color: #4ED0AA;
bottom: 0;
height: 120px;
position: absolute;
width: 100%;
}
Result:
What should happen: The layer with the background-image as well as the layer with the blue transparent background should go until the footer begins. The problem is the sticky footer I think...
Looks like that: