I'm playing with the opacity
CSS attribute.
It works nicely for the box (with at 50% or black at 30%) - the problem is that the text inside the box is also transparent.
I would like the text to be 100% white in a box with at 30% transparency.
The solution is to use CSS with tweaks or to use a .png
for the background and to forget the opacity
setting.
Tell me, how to do 30% opacity with 100% opacity text inside.
Thanks in advance
Note: rgba does not work in IE6-8
Your choices are:
background: rgba(255, 255, 255, 0.3)
. Live Demo<div>
tags on top of each other. One of them is the background, and has theopacity
setting. The second one has the text in it, and atransparent
background..png
file with30%
transparency.I knew I'd read about a way to make the
rgba
work in IE.See: http://robertnyman.com/2010/01/11/css-background-transparency-without-affecting-child-elements-through-rgba-and-filters/