我正在为我的网站使用OSclass,我试图在底部设置粘性页脚,但是没有任何效果。你可以看到我的网站这里
它在我的主页上工作,因为我的内容很长,但它不工作的项目或帐户,例如。
CSS:
body {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
background: transparent;
list-style-type:none;
}
.header {
height: auto;
background-color: #0080c4;
clear: both;
}
.header_wrap {
width:960px;
margin:0 auto;
position:relative;
padding: 10px 0 160px 0;
}
.header .wcont {
float:left;
width:468px;
padding:0px;
color:#FFFFFF;
}
.content {
clear: both;
margin-bottom: 20px;
width: 960px;
margin-left: auto;
margin-right: auto;
}
.footer {
padding-top: 5px;
padding-right: 33px;
padding-left: 33px;
padding-bottom: 0;
background-color: #0080c4;
clear: both;
position: relative;
}
.footer_wrap {
width:960px;
margin:0 auto;
position:relative;
padding:0 0 25px 0;
}
.footer .wcont {
float:left;
width:200px;
padding:0 15px;
color:#FFFFFF;
}有人想办法解决这个问题吗?
发布于 2014-02-04 18:54:19
将这些属性添加到您的页脚,它应该会修复它:
footer {
position: fixed;
bottom: 0px;
width: 100%;
}发布于 2014-02-04 18:53:54
页脚类样式中的Position: fixed;和bottom: 0;可能会给出所需的结果。
https://stackoverflow.com/questions/21560775
复制相似问题