浏览器窗口和页脚之间的间隙
#footer
{
text-align:center;
clear:both;
background: url("images/footer.png") repeat-x #8DC63F;
width:100%;
margin:0;
}
.footer-text
{
padding: 10px 0 0;
white-space:nowrap;
font-family:'Tahoma';
font-size:10pt;
color: #000000;
}
HTML:
<div id="footer">
<p class="footer-text">Home | Services | About Us | Products | Contact Us</p>
<p class="footer-text">2011 © All Rights Reserved.</p>
<p class="footer-text"> </p>
</div>
帮我去掉浏览器窗口和页脚之间的多余空间
最佳答案
尝试在#footer 中使用 overflow:hidden。
此外,如果您能给我们一个显示差距的 URL,那就太好了。问题在于,有时 CSS 规则会影响多个元素,因此如果没有完整的代码,很难准确判断发生了什么。
希望对您有所帮助。
关于CSS - 页脚中的空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8623300/