2011-10-09 85 views
1

我制作了一个图像库,能够正确呈现除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”没有上边距,但我真的需要这个边距。

+1

你忘了把#放在thumbContainer之前。 – punit

回答

1

感谢所有的答案和建议。

事实上,我最终修复IE7问题的方式是给父元素 - “carouselContainer”填充填充,并删除“thumbContrainer”的边距。

虽然它解决了这个问题,但仍然不确定与原来设置的是什么,即使使用* margin-top也没有帮助。

+0

你是如何修复它的? – Muhammed

+0

Athimannil,老实说,我不记得以上说过了,因为它是几年前。抱歉。 – hanazair

1

尝试在#thumbContrainerpadding更换margin

#thumbContrainer{ 
    position:relative; 
    left:20px; 
    height:110px; 
    padding:30px 0px; 
    width:5000px; 
    border:none; 
}