I want to make an effect similar to exponent win7: the title bar has an opacity of less than 1, and the content has no transparency.
Then I tried to combine the two elements together to do this:
<div id="outer" style="background-color:black;opacity:0.6;padding:30px;position:absolute;width:400px;height:400px;"> <div id="inner" style="background-color:gray;opacity:1;height:100%;"></div> </div>
I want div#outer have an opacity of 0.8, and then div#inner does not have transparency (with opacity = 1).
However, this does not seem to work. Since the opacity of div#outer will affect the opacity of div#inner .
Any ideas?
source share