The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › transparent problem
I can’t figure out why this
zoom: 1; filter: alpha(opacity=50); opacity: 0.5;
is making the entire header transparent. do i have to have a div on top of a div to make this work. Link
The opacity property changes the alpha level for the entire element, to change just the background you would need to use rgba like the below example:
element { background-color: rgba(0,0,0, .5); }
NOTE: rgba() won’t work in IE8 and below, for these browsers you will need to fallback to using either a HEX or RGB color.
rgba()
element { background-color: #000; /* IE fallback */ background-color: rgba(0,0,0, .5); }