Reputation: 7311
CSS
.popup {
z-index: 10000;
filter: alpha(opacity=40);
-moz-opacity: .40;
background-color: #000000;
}
HTML
<div class="popup" style="display: none; overflow: auto;">
<img src="~/image.png" /> <!--it also becomes transparent. -->
</div>
I would like not to make the image transparent. Any help?
Upvotes: 0
Views: 229
Reputation: 29693
try setting transparency for background-color
instead of opacity
for element as below
background-color:rgba(255,0,0,0.5); //0.5 is the transparency you are setting for color
for more info see this Article
Upvotes: 3