【发布时间】:2013-07-01 23:17:39
【问题描述】:
我目前正在处理一个网站,它需要一个粘性页脚,因为某些页面内容比其他页面小。
我尝试了许多资源/教程来尝试使粘性页脚正常工作。
我已尝试实施本教程,下面是我的代码。我希望有人
任何人都可以建议对我的代码进行 CSS 更改以实现此功能。
<body>
<div id="wrapper">
<div id="header-wrap">
<div id="header"></div>
<div id="home-header"></div>
<div class="push"></div>
</div>
<div id="footer-wrap">
</div>
</div>
</body>
CSS
#footer-wrap
{
background: url("images/footer.jpg") repeat-x scroll center bottom transparent;
color: rgb(117, 139, 141);
height: 462px;
position: relative;
width: 100%;
}
#header-wrap
{
clear: both;
min-height: 100%;
margin-bottom: -462px;
}
#header-wrap:after
{
content:"";
display:block;
height:462px;
}
不适合我。需要帮助!
'push' 也没有被使用。可以用吗?
编辑
body {
height: 100%;
margin:0px
}
html
{
height: 100%;
margin: 0px;
}
#wrapper
{
min-height: auto !important;
min-height: 100%;
}
【问题讨论】: