2

我的页面在页脚的末尾有一个空白,但在尝试了一切之后,我认为我仍然不知所措。

由于固定的右侧导航和流畅的中间容器,我们使用“推送”类和负边距来实现可能会影响它的相等列。

这是CSS:

#main-content {
margin: 0 5% -100px;
min-width: 960px;
max-width: 1137px;
overflow: hidden;
min-height: 100%;
}

.right-nav {
float: right;
width: 31.5%;
border-left: 1px solid #DDD;
padding-top: 1.5em;
padding-bottom: 10040px;
margin-bottom: -10040px;
width: 358px;
}

#middle {
width: 67.2%;
height: 100%;
padding: 1.5em 1.2% 15px 0;
margin-bottom: 3em;
width: auto;
margin-right: 358px;
}

#footer-wrapper, #push {
height: 100px;
overflow: hidden;
}

#footer-wrapper {
clear: both;
width: 100%;
border-top: 1px solid #323232;
padding: 20px 0 0;
background: #33383C;
background: #3F4952 url("/images/bg.jpg") repeat;
}
4

4 回答 4

1

出于某种原因,#_atssh(id 为“_atssh”的div)是罪魁祸首,即使它的位置设置为绝对,并且可见性是隐藏的。相反,添加样式display: none.

这当然很有趣,我将继续调查。

于 2013-10-13T22:53:14.423 回答
1

div 出于某种奇怪的#_atssh原因导致了这种情况,两种解决方案......

首先是#_atssh{display:none;}

其次,您可以将其向上移动几个像素#_atssh{bottom:10px;}

于 2013-10-13T23:03:08.740 回答
0

这是删除页面底部多余像素的快速方法:

#footer-wrapper {
  margin-bottom:-1px;
}
于 2013-10-13T23:10:24.290 回答
0

NetworkNerds 解决方案将起作用,尽管我不喜欢使用负值进行定位。我会推荐这个:

#footer-wrapper {
    clear: both;
    width: 100%;
    border-top: 1px solid #323232;
    padding: 20px 0 0;
    background: #33383C;
    background: #3F4952 url("/images/bg.jpg") repeat;
    position: absolute; /*This will set the position*/
}
于 2013-10-13T23:32:41.467 回答