开发者

How to get a footer to stick to the end of my web page text? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help ma开发者_Go百科king this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜