CSS Hack: Opacity on IE
If you want to get opacity to work on all IE browsers, use the following IE filters in the order:
Note: opacity gets inherited by child elements. So it's better to use background-color:rgba(r,g,b,alpha). For IE browsers, use gradient filter with #argb.
.opaque { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; // for IE8/9 filter: alpha(opacity=50); // for IE5-7 opacity: .5; // for all other browsers }
Note: opacity gets inherited by child elements. So it's better to use background-color:rgba(r,g,b,alpha). For IE browsers, use gradient filter with #argb.
It's a good hack for IE in general, however, it may not be required for IE5 and IE 5.5 anymore.
ReplyDelete