View Full Version : Semi-transparent div:


lukejtharries
04-21-2006, 09:20 PM
Ok here is my problem.
On my webpage I have a div which I want to be semi-transparent so that you can see the background. Here is my code for the div I am trying to configure.
#main
{position: absolute;
width: 762px;
top: 200px;
background-color: #000000;
filter: alpha(style=0,opacity=50);
}
As seen in the red parts, I have already tried something but it doesn't work.
Perhaps it is just my browser (I use FireFox)
Does it only work in IE or something??

iTom
04-21-2006, 10:29 PM
It only works in IE5+

BlueSync
04-21-2006, 11:28 PM
Add this, see if it works. Firefox has it's own code for opacity.


opacity: 0.5;
-moz-opacity:0.5;


Change .5 to whatever opacity ou want.