我以前来过这里并取得了很好的成绩,感谢您的帮助。我一直在搜索和搜索我的代码以弄清楚发生了什么,但我不太明白。在我的网站 http://www.hirelogo.com导航下方有一个随机空格插入。我已经删除了 div“.top”,因为我认为这可能是导致问题的原因,但据我所知这不是。我一直在剖析 Firebug ,但没有发现可能导致这种情况的重叠问题。我指的随机空间区域位于导航“home,design team..ect”和“step1, step 2 graphic”下方。我希望有人能稍微提醒一下这里发生的事情。 谢谢
最佳答案
下面的 div 造成了 8px
的空间。
.top {
clear: both;
height: 8px;
margin-left: auto;
margin-right: auto;
width: 920px;
}
左边的图像也添加了 padding
和 line-height
:
.descrSplash {
clear: both;
color: #FFFFFF;
font-size: 18px;
font-weight: bold;
line-height: 150%;
padding-top: 40px;
width: 436px;
}
最后,右图在其上方和下方添加了 10px
。图像也很大,除非您想设置 negative margin
,否则可以裁剪以提升它。
关于html - 为什么两个div之间有空隙并且没有重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14411516/