我制作了一个图像库,能够正确呈现除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