views:

102

answers:

1

I am using supersleight to fix png transparency, but it is causing a strange bug, where the browser seems to ignore any overflow rule in IE6.

Here is what it looks like (had to hide the list of things, but you get the idea...)alt text

I am stuck with using the fix and never come across a problem with it before.

Here is the markup:

            <div class="placeholder">
                <div class="image">

                    <img src="img/blank.png" alt="" />
                    <img src="img/1.png" alt="" id="image1" />
                    <!-- More images... -->
                </div>
                <div class="text">                      
                    <h2>Time</h2>

                    <div class="scroll">
                    <ul>
                        <li><a href="#image1">List item</a></li>
                        <!-- More list items... -->                 
                    </ul>
                    </div>  
                </div>
                <br class="clear" />                        
            </div>

And the CSS:

#location #content.occupiers .placeholder .text .scroll{height: 380px; width: 260px; overflow: auto;}

I am using some jquery to show the images on the left, but when removing the jquery function, the problem remains. I tried overflow:hidden. It hides it for a second, then flashes back into the state shown in the image. When removing the image div next to it, the problem is still there. Kind of baffled, especially because the scroll bar is still there!

+1  A: 

Have you tried putting position:relative on the scroll class ?

Gaby
Nope, but I have now and it did the trick. Thanks! Why does this work, because it doesn't make much sense to me.
danixd
@danixd, it is a known bug in IE, that positioned elements do not respect the overflow property of their container if it is not positioned as well.http://snook.ca/archives/html_and_css/position_relative_overflow_ie/ .(*and supersleight adds `position:relative` to the elements it affects, which bring this bug out in your case*)
Gaby
Oh right, that makes sense now. Thanks for clearing that up!
danixd