Why CSS opacity is affecting div above it?

The opacity effects not just the element itself but everything in overlay (so message too). It works if you separate the overlay and the message: div class="modal"> overlay message Message { /* … */ } Here message is not a descendant of overlay and thus not affected by overlay ’s style.

The opacity effects not just the element itself but everything in overlay (so message too). It works if you separate the overlay and the message: overlay message And the CSS: . Modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .

Overlay { /* … */ } . Message { /* … */ } Here message is not a descendant of overlay and thus not affected by overlay’s style.

Thnx, it worked! – newbie Jul 24 '10 at 13:52.

Thanks to Gumbo also from me -- I used your code and it was exactly what I needed.

But for some reson upper element gets also opacity from element under it. EDIT: I only have tested this with latest Firefox.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions