我有一個簡單的問題,我在圖片上方顯示文本的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