OSclass中的粘性页脚

时间:2014-02-04 18:44:19

标签: html css

我在我的网站上使用OSclass,我试图在底部设置粘性页脚,但没有任何效果。 您可以看到我的网站here

它适用于我的主页,因为我的内容很长,但它不适用于项目或帐户。

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;
}

任何人都有解决它的想法吗?

2 个答案:

答案 0 :(得分:0)

页脚类样式中的

Position: fixed;bottom: 0;可能会提供您想要的结果。

答案 1 :(得分:0)

将这些属性添加到页脚,它应该修复它:

footer {
  position: fixed;
  bottom: 0px;
  width: 100%;
}
相关问题