XHTML & IE6 overflow:hidden problem
How can I get this CSS de开发者_JAVA百科claration to work in IE6 please?
#mask{width:725px;height:495px;margin:0;border:0;padding:0;overflow:hidden;}
The problem is the content which is much larger than 725px and exactly 495px (much like a horizontal scrolling thingy) does not get hidden in IE6.
Edit:
1. The background images of the hidden divs shows. 2. I am also using Twin-Helix PNG Fix 2.0 Alpha.Thank you.
This will be happening because you have relatively positioned elements inside your #mask
container.
This is due to a bug where relatively positioned children are not correctly clipped and hidden for a parent element with overflow: hidden
applied in Internet Explorer 6 and 7. The same problem also exists for overflow: auto
and undoubtedly overflow: scroll
as well.
It can be fixed by also applying position: relative
to the element you are setting the overflow on.
精彩评论