繁体   English   中英

页脚不会到底

[英]Footer won't go to the bottom

我需要一些快速的帮助。 我的页脚根本不会在网站的末尾停下来。 它在包装器内部等等。 我根本找不到错误(长时间查看相同的代码)

我已将代码放入Jsfiddle: http//jsfiddle.net/heNuB/

不介意其他代码,我用背景颜色标记了页脚:黑色; 所以你可以看到页脚试图去的地方。 它正试图进入我的3个盒子的“后面”。

希望你们中的一些人有时间研究它。 我知道这有点像一个noobish问题。

祝大家好日子! :)

在页脚前面放一个清除div,它应该到底部。

<div style="clear: both"></div>

你漂浮的盒子正在推过主包装盒。

供参考: http//www.quirksmode.org/css/clearing.html

使用clear: both;

footer
{
    font-size:small;
    text-align:center;
    height:50px;
    background-color:black;
    clear: both;

}

演示http//jsfiddle.net/Sudjy/

或者你可以增加margin-top属性这是我的代码:

  .footer {
background-color: #717164;
margin-top: 50px;  
border: 1px solid black;
float: left;
width:99%;
height: 10%;
position: fixed;
clear: both;
margin-top: 565px;
}

.footer是因为我给了我的页脚div一个你不知道的页脚。

为什么不给页脚一个顶级属性.footer {margin-top:50px; //或其他什么东西}它应该下降。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM