2010-08-23 55 views
0

同样的问题(见Sticky Footer, but only sometimesSticky Footer, but only sometimes...continued)之前...粘滞的页脚,但只有有时。 3

我有,我想坚持到页面的底部,除非内容填充页面页脚,那么我想让它变得下推。我已经与其他网站做了十几次,但我无法让这个工作。在Wordpress中工作。我已经检查了我的divs的订单,我已经阅读了CSS ...任何帮助表示赞赏。

主css成分:

* { 
    margin: 0; 
    padding: 0; 
} 

html, body { 
    height:100%; 
    min-height:100%; 
} 

#wrapper { 
    background:url("images/shadowborder.png") repeat-y center; 
    width:100%; 
     max-width:100%; 
     min-width:980px; 
    min-height:100%!important; 
     margin:0 auto; 
    margin-bottom:-20px; 
    position:relative; 
    overflow:auto; 
} 

#content { 
    clear:both; 
    float:left; 
    padding:20px 20px 60px 20px; 
    font-size: 1.6em 
} 
#spacer { 
    height: 40px; 
    clear: both; 
} 

#footer { 
    position: relative; 
    border-top: 1px solid #e5a5fc; 
    padding:3px!important; 
    height:20px; 
} 

网站:

http://www.hcfmissoula.com

回答

0

我使用的配方是:

  • height: 100%html
  • min-height: 100%position: relativebody(与height:100%对IE6)
  • position: absolutebottom: 0的页脚DIV

可能会非常棘手,防止页脚虽然从模糊的底部附近一些文字。

+0

http://www.cssstickyfooter.com/这是我使用的一个。这对我来说一直很好...... – blackessej 2010-08-23 22:51:37

+0

直到现在,也就是;) – blackessej 2010-08-23 22:52:07