我第一次使用粘性页脚与网站放在一起,但似乎没有按计划进行。似乎有一个大的空白区域,然后是一个黑色的区域(这是我的页脚的颜色),请参阅链接http://c-hall.the-word.com/assignment/whatwedo.php我需要页脚对接最后一点内容的底部,在这种情况下,文本女巫尚未被塑造。请看下面的代码 - 感谢您的帮助 - 查理粘性页脚帮助
CSS
/* sticky footer */
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -335px;
}
.footer, .push {
height: 335px;
background-color: #000;
}
#innerfooter {
width: 847px;
height: 335px;
position: relative;
background-image: url(../images/black_bar.png);
background-repeat: no-repeat;
text-align: left;
margin: 0 auto;
}
/* end sticky footer */
这是我正在尝试的一个,但是仍然在页面上出现这个很大的差距 - http://c-hall.the-word.com/assignment/whatwedo.php,任何线索? – Charley 2011-04-05 12:50:01
只有页脚上方的id ** main **的div具有“335px”的填充底,因此存在巨大的差距。把这个关掉,你应该没问题。页脚似乎运作良好:) – redroot 2011-04-05 17:40:43