我製作了一個圖像庫,能夠正確呈現除IE7以外的任何地方 - http://ianespinoza.com/。在IE7中無邊距
我使用的結構如下:
<!-- this div is the overall container for the carousel -->
<div id="carouselContainer">
<!-- this div contains all the thumbs and this div is animated to slide. -->
<div id="thumbContrainer">
<ul class="thumb">
<!-- Img 1 -->
<li>...</li>
etc....
</ul
</div>
</div>
這裏是應用於這些元素的樣式:
#carouselContainer {
width:934px;
height:145px;
border:none;
overflow:hidden;
position:relative;
left:40px;
top:5px;}
#thumbContrainer {
position:relative;
left:20px;
height:110px;
margin:30px 0px;
width:5000px;
border:none;}
ul.thumb {
list-style: none;
margin: 0;
padding: 0px;}
所有正確呈現在所有瀏覽器,除了IE7。
在IE 7 div「thumbContrainer」沒有上邊距,但我真的需要這個邊距。
你忘了把#放在thumbContainer之前。 – punit