我有一个简单的问题,我在图片上方显示文本的div。在IE浏览器中,只有当文字div的图片&之间应该没有空隙时(如Firefox在那里没有空隙)之间存在差距。IE问题:div之间的差距&img
你能帮我弄清楚如何删除第一张图片&下面的div的差距?
<html>
<head>
<style type="text/css">
<!--
.pageBox { width: 873px; }
.pageBoxContent { background-color: blue; padding: auto; margin: auto; /*background: url("images/pageBoxMid.png") repeat-y;*/
padding-right: 50px; padding-left: 50px; margin-top: 0px; background-color: blue; }
.pageBoxTop { background-color: red; }
.pageBoxBottom { background-color: red; }
-->
</style>
</head>
<body>
<div id="container">
<div class="pageBox">
<img class="pageBoxTop" src="images/pageBoxTop.png" alt=""/>
<!-- Gap appears here on display -->
<div class="pageBoxContent">
It was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the SeleuIt was founded in the mid-3rd century BC by Arsaces I. Mithradates I greatly expanded the empire by seizing Media and Mesopotamia from the Seleu
</div>
<img class="pageBoxBottom" src="images/pageBoxBottom.png" alt=""/>
</div>
</div>
</body>
</html>
您是否尝试设置'padding' 0,而不是汽车?你有没有试过把'.pageBoxTop'的'padding/margin'设置为0? – nnnnnn
@nnnnnn:padding:0;保证金:0;不工作 – Mack
也许这个问题的解决方案之一:http://stackoverflow.com/questions/1207541/strange-gap-between-div-elements-in-ie-not-in-ff-or-opera会有帮助吗?试试'img'上的'display:block'。 – nnnnnn