How to get a footer to stick to the end of my web page text? [closed]
I got a huge problem on this website.-> http://www.webbon.ca/demo/dev/home/
The problem is simple. I just need to get the footer to stick to the end of the text. You can use inspect element or firebug to tell me which modification you made to get it to work fine.
Here is a simple way to get a footer which sticks to the bottom of the page:
CSS:
* {
margin:0;
padding:0;
}
html, body {height: 100%;}
#wrap {min-height: 100%;}
#main {
overflow:auto;
padding-bottom: 150px;
}
#footer {
position: relative;
margin-top: -150px;
height: 150px;
background-color: #CCCCCC;
clear:both;
}
HTML:
<div id="wrap">
<div id="main">
<h1>Content!</h1>
</div>
</div>
<div id="footer">
<p>I'm the footer.</p>
</div>
You can see more, and get specific fixes, at http://www.cssstickyfooter.com/using-sticky-footer-code.html.
精彩评论