Link to home
Start Free TrialLog in
Avatar of suki_babee
suki_babee

asked on

CSS: Overflow hidden causes links to not work in Safari - online example

I am trying to create an animated scrolling list of images.  I use a div set with a small width and style overflow to "hidden".  It contains a larger div that contains the images.  Changing relative positioning of the large div moves the images, and the excess is clipped via the overflow.  It works great in firefox and IE ... see the example :

http://soxstudios.com/safari_problem_070406/

but in Safari, the overflow that is hidden (and shouldn't exist) causes problems.  It seems to block mouse events of elements that are visible in the same space.  The example demonstrates this - provided you view it using the Safari browser (I'm testing with Version 2.0.4 (419.3)).

Other sites that use the same technique work though.. like http://tv.yahoo.com and http://www.900frames.tv/ (the developer had this problem, and posted his solution - which doesn't help me : http://www.dynamicdrive.com/forums/showthread.php?t=7036 ).

i need help !!!
Avatar of Mark Steggles
Mark Steggles
Flag of United States of America image

Hello suki_babee,

I havnt got safari so I cant test this. But you know that z-index only works on positioned elements? Just checking you know that

Regards,

Steggs
Avatar of suki_babee
suki_babee

ASKER

Thanks Steggs.  Yeah, I thought that but tried it anyway.  Countless IE problems make you try anything!  :)

So I actually solved the problem.  It turns out I *DO* have the same problem as the www.900frames.tv guy - as he posted.  Except my mistake was the height on the content div "box2" (his was width).  In my original prototype, I had it set to 37 pixels (the same as the images) - but didn't account for padding - so I needed 43 pixels.  It looked ok - and i only focused on checking the width.  I wish I had checked the $%&# height too.  It is very strange behavior.

To anyone searching for a solution to an overflow:hidden issue messing up links on a page in Safari - make sure the div that you position as relative is large enough to hold all the contents.  If not sure, set the width and height to very large values, and test that.  I'll update and leave the example up online for a while for anyone interested.   I wasted a whole day on this.  :(
ASKER CERTIFIED SOLUTION
Avatar of ee_auto
ee_auto

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial