I have a container with an opacity of 0.8. At the background, I have an image that shines through the content div. Now, I have a photo of my client in this container. The problem is, that it uses the opacity of the parent element as the opacity for this image is just relative to the container and not to the body.
I have this code:
<div id="contentContainer" style="background: #FFFFFF; opacity: 0.8">
Content ...
<img src="..." style="opacity: 1.0" alt="Photo" />
</div>
This does not work, as explained below.
Has anybody an idea?
background: rgba(0, 0, 0, 0.5);
would be your best best. rgba break down: 0, 0, 0, => colors red, green, blue values. a 0.5 => this is the colors alpha or opacity. – Josh Powell Oct 18 '13 at 19:04