HTML
<div id="footer"></div>
CSS
#footer {
position:absolute;
bottom:0;
width:100%;
height:100px;
background:blue;//optional
}
set its position:fixed and bottom:0 so that it will always reside at bottom of your browser windows
use this style
min-height:250px;
height:auto;
Perhaps the easiest is to use position: absolute
to fix to the bottom, then a suitable margin/padding to make sure that the other text doesn't spill over the top of it.
css:
<style>
body {
margin: 0 0 20px;
}
.footer {
position: absolute;
bottom: 0;
height: 20px;
background: #f0f0f0;
width: 100%;
}
</style>
Here is the html main content.
<div class="footer"> Here is the footer. </div>
You could use position:fixed;
to bottom
.
eg:
#footer{
position:fixed;
bottom:0;
left:0;
}
Source: Stackoverflow.com