I need to show an element (image) overlaying a Div
that has a overflow:hidden
applied to it. Since the overflow is hidden , its naturally covering anything I want to sit on top of it. How do I get around this?
views:
38answers:
3
+1
A:
Obviously you can remove the overflow hidden. Do you need it to clear floats? If so you can substitute with a clearfix.
Would be better if you provided more info.
meder
2010-09-08 03:38:44
No, I cant remove the 'Overflow: Hidden' property. It's critical to the thing I'm designing. Its not a traditional website. I need to somehow move something forcibly into an area covered by that div.
egfx
2010-09-08 03:45:55
You could try `position:relative` with a negative margin. I forget if that gets clipped, though. Or you could somehow create a parent div and put the new overlay as a child, and make your current overflow hidden a sibling of the overlay.
meder
2010-09-08 03:48:47
Not sure how exactly but thank you, `position:relative` with a negative margin fixed the problem. We must be somehow speaking the same language. :)
egfx
2010-09-08 05:36:37
A:
Are you sure the overflow hidden is the problem? It sounds more like a layering issue if the div is covering the image you're trying to display.
david
2010-09-08 03:48:03
A:
Wrap your Div with overflow:hidden(d1) on another div(d2) with no overflow value, add another floating div over the wrapper (d2) and put your image or other elements inside it :) This will work given your general description. If you put a sample of your HTML/CSS code it'll be easier to fix for your particular case.
Michel Triana
2010-09-08 05:02:57