如何摆脱底部的空白? [英] How to get rid of the whitespace at the bottom?
问题描述
有人可以帮我删除本网站底部的额外空白吗? http://www.vonlay.com/
此图片显示我要删除的内容: http://img691.imageshack.us/ img691 / 8837 / screenshot20110607at715.png
这是我如何设置页脚。
html,body {height:100%; }
body> #wrapper {height:auto; min-height:100%; }
#footer {position:relative; height:140px; z指数:10;清除:
margin-top:-140px;背景:#700; color:#fff; }
您应该添加:
#footer .content p {
margin-bottom:0
}
我实际上写了另一个答案,解释了正确的情况,是:
您应该将 overflow:hidden
添加到 #footer
这将解决问题,即上的
margin
元素会通过 #footer
。请参阅:折叠边距。
如果这似乎不大可能,尝试添加此项,只是为了查看会发生什么
: #footer .content p {
margin-bottom:200px
}
Can someone please help me eliminate the extra whitespace at the bottom of this website? http://www.vonlay.com/
This image shows what I am trying to remove: http://img691.imageshack.us/img691/8837/screenshot20110607at715.png
Here is how I have the footer setup.
html, body { height: 100%; }
body > #wrapper { height: auto; min-height: 100%; }
#footer { position: relative; height: 140px; z-index: 10; clear: both;
margin-top: -140px; background: #700; color: #fff; }
You should add:
#footer .content p {
margin-bottom: 0
}
I actually wrote another answer before that one that explains what's going on properly, with an alternative fix, here it is:
You should add overflow: hidden
to #footer
.
This will resolve the problem, which is that the margin
on the p
element inside <div class="copyright-notice">
is collapsing through #footer
. See: collapsing margins.
If this seems unlikely to you, try adding this, just to see what happens:
#footer .content p {
margin-bottom: 200px
}
这篇关于如何摆脱底部的空白?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!