Css 浮动页脚prpblem

Css 浮动页脚prpblem,css,responsive-design,footer,sticky-footer,floating,Css,Responsive Design,Footer,Sticky Footer,Floating,伙计们 我正在建立一个快速响应的网站,我的页脚在底部浮动 在我的index.page()上,我的代码工作正常,但我的内容页()有问题,即使我对浮动页脚使用相同的代码 有人能给我一个如何解决这个问题的提示吗 我的浮动代码: .container { min-height: 100%; /* equal to footer height */ margin-bottom: -120px; } .container:after { content: ""; display: block; } .

伙计们

我正在建立一个快速响应的网站,我的页脚在底部浮动

在我的index.page()上,我的代码工作正常,但我的内容页()有问题,即使我对浮动页脚使用相同的代码

有人能给我一个如何解决这个问题的提示吗

我的浮动代码:

.container {
min-height: 100%;
/* equal to footer height */
margin-bottom: -120px; 
}

.container:after {
content: "";
display: block;
}

.site-footer, .container:after {
/* .push must be the same height as footer */
height: 120px;
text-align: center;

}

.site-footer {
background-image: url(../images/footer_bg_trans.png);
background-repeat: no-repeat;
background-position: center top;
text-align: center;
position: fixed;
width: 100%;
bottom: 0;
}

/Mika

内容页上的CSS与索引页上的CSS不同。索引页上.site页脚的CSS为:

.site-footer {
background-image: url("../images/footer_bg_trans.png");
background-position: center top;
background-repeat: no-repeat;
bottom: 0;
position: fixed;
text-align: center;
width: 100%;
}
其中,如内容页上所示:

.site-footer {
background-image: url("../images/content_footer_bg.png");
background-position: center top;
background-repeat: no-repeat;
margin-top: 10px;
text-align: center;
}

您缺少宽度:100%;位置:固定;底部:0

谢谢你的回答,詹姆斯。是的,index.html可以。我现在只想让“me.html”代码正常工作。其他文件仍然有那个“旧的”。site foote类标签。。