
Cross-browser opacity

The current Candidate Recommendation for CSS3 Color [1] proposes
a CSS property called opacity that would offer a straightforward
means of setting an element's opacity. Current Mozilla browsers,
Opera, and Safari 1.2 support this syntax:
#elementid {
opacity: 0.5;
}
Older Mozilla browsers require a nonstantard property name:
#elementid {
-moz-opacity: 0.5;
}
Older versions of Safari and Konqueror use a different
nonstandard property name:
#elementid {
-khtml-opacity: 0.5;
}
Internet Explorer, in its infinite wisdom, still requires that
you use DirectX filters to achieve this effect:
#elementid {
filter: alpha(opacity=50);
}
This will work in Internet Explorer 4 or later, but Microsoft
would prefer you use the more cumbersome Internet Explorer 5.5
version:
#elementid {
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
}
To get the broadest possible effect, you can apply all of these
in tandem:
#elementid {
opacity: 0.5;
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
filter: alpha(opacity=50);
}