html, body, #container { height: 100%; } body > #container { height: auto; min-height: 100%; } #footer { clear: both; position: relative; z-index: 10; height: 3em; margin-top: -3em; background-color:red; }
<div id="container"> <div id="content" style="height:1000px;"> asdasdsa </div> </div> <div id="footer">My Sticky Footer</div>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)