IE 7& 8溢出:隐藏问题 [英] IE 7 & 8 overflow:hidden problem
问题描述
我正在开发一个项目的CSS。并遇到一些溢出问题与IE。这是测试网站:
I am working on the CSS of a project. And encounter some Overflow problems with IE. This is the testsite:
http://eparking.bluesys2.ch/fr/parking/search.html?l=Fribourg&d=27.6.2010&t=
您可以使用列表下的按钮滚动列表。
在firefox,safari和所有其他正常的浏览器什么工作正常。但在IE我不能让这个 overflow:hidden;
工作,它开始驱使我疯了。该列表显示总是显示在其全长,现在重要我试试。任何人都可以给我一个线索?
You can scroll the list using the buttons under the list.
In firefox, safari and all the other normal browsers anything works fine. But in IE i can't make this overflow: hidden;
to work and it starts to drive me crazy. The list shows always shows up in its full length, now matter what i try. Can anyone give me a clue?
这是列表容器的css:
this is the css of the list container:
div#listing {
width: 204px; height: 364px; overflow: hidden;
}
这是其中的对象:
div#listing ul li {
position: relative;
padding: 5px;
margin: 0 0 7px;
height: 54px;
background-image: -moz-linear-gradient(top, #f5f5f5, #ddd);
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f5f5f5),color-stop(1, #ddd));
border: 1px solid #ddd;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0 0 8px #ddd;
-webkit-box-shadow: 0 0 8px #ddd;
box-shadow: 0 0 8px #ddd;
}
如果我将包含我的列表的LI的UL设置为100px带有隐藏的溢出。他们出现了。
Event if i set the UL that contains the LI's with my list to 100px height with a hidden overflow. They show up.
推荐答案
众所周知的IE错误。这样做:
Well known IE bug. Do this:
div#listing {
position: relative;
width: 204px; height: 364px; overflow: hidden;
}
编辑:Link在此解释: http://snook.ca/archives/html_and_css/position_relative_overflow_ie/
Link explaining it here: http://snook.ca/archives/html_and_css/position_relative_overflow_ie/
这篇关于IE 7& 8溢出:隐藏问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!