>> I think you may be missing the fact that opacity in CSS3 is "recursive".
>>
[quoted text clipped - 23 lines]
> cannot enter data. Then on top of that gray haze have a solid
> message box with buttons.
On Feb 28, 10:52 am, "Rik Wasmus" <luiheidsgoe...@hotmail.com>
> Yes: absolute positioning, 2 containers (opaque element & container for
> pop-in box), don't make the one with the pop-in box a descendant but
> rather a sibling with both an apropriate z-index.
Rik;
I'm a noob still learning this stuff so I am not sure I understand
what you wrote.
Do you mean use 2 container divs, one containing the transparent
underlay and one containing the message box, with the message box &
underlay having the same z-index?
It seems that if I have two divs, one under the other, that the top
will become the parent. Can I neutralize that by setting the zindex
in each to be the same?
Steve - 28 Feb 2008 16:54 GMT
Rik;
Thinking about how to understand your comments made me stumble across
what the problem was:
<div id = "underlay" />
<div id = "messageBox">
blah blah blah
</div>
I thought <div/> was the same as <div></div> with the "underlay"
div. However, the first style was making the "underlay" div a parent
to the messageBox div. I switched to the second style of closing a
div and the problem cleared up.
Thanks
Ben C - 28 Feb 2008 17:24 GMT
> On Feb 28, 10:52 am, "Rik Wasmus" <luiheidsgoe...@hotmail.com>
>> Yes: absolute positioning, 2 containers (opaque element & container for
[quoted text clipped - 13 lines]
> will become the parent. Can I neutralize that by setting the zindex
> in each to be the same?
You may not need to use z-index.
I posted an example of one way to do it earlier. But however you do do
it, the bottom line is to remember that you can never make an element
more opaque than its ancestors.
You could achieve the same effect using pngs with alpha of course--
those are just alphas, not recursive opacities. That might be easier.
Just make a 1x1 pixel semi-opaque png, tile that as the background image
on your overlay that's supposed to grey things out, and then put the
popin on top. Don't set opacity on anything.