This question already has an answer here:
- Specify parent divs opacity but make it not affect children HTML elements 4 answers
So I'm trying to create a lightbox like feel. I created a #blackout
div and an #enlargedBOX
div.
The #blackout
div has it's opacity set to 90%, because I want the background website to show through just a bit, however i do NOT want my #enlargedBOX
div to use that same opacity. It seems that #blackout
forces its own opacity onto anything within itself. How can i stop that?
<div id="blackout">
<div id="enlargedBOX">
<img src="" width="500" height="500" border="0" />
</div>
</div>
Here's a jsFiddle
You'll see that the RED background shows through on the white #enlargedBOX
div.