I'm facing an issue with the web page layout of my website. Here is a snippet of the structure:
<body>
<div class="container">
<div class="sidebar">
</div>
<div class="content">
</div>
</div>
<div class="pre-footer">
</div>
<div class="footer">
</div>
</body>
Here is the CSS styling being used:
body {background:#eaeaea url('../images/bg/sfere.jpg') no-repeat top center fixed;}
.footer {float:left;width:100%;height:67px;background:url('../images/bottom.png') bottom center;bottom:0px;left:0px;}
.container{padding-top:5px;margin-left:100px;margin-right:auto;}
.sidebar {float:left;width:220px;min-height:610px;text-align:center;}
.home {margin:178px 0 0 100px;padding:0 10px 0px 10px;width:800px;float:left;}
.pre-footer {float:left;width:98%;height:100px;position:relative;background:url('../images/pre-footer.png') bottom center;left:15px;bottom:-32px;}
Although all elements are displaying correctly in the layout, there is an issue when the container's height is less. The footer elements end up below the container instead of staying at the bottom as intended. Similarly, setting a fixed height for the footer doesn't solve the problem as on browser resize, it still sticks below the container.
How can I fix this problem?