Opacity & Other Filters in Internet Explorer 8

Setting Opacity and Other Filters in Internet Explorer 8

It was expected that  Internet Explorer 8 will support the standard “opacity” property of CSS, but it seems that its developers have decided not drop the support for filters yet, which is not that bad, though, as it still lacks support for <canvas> scripting.

However, there is a great difference between the filter support in IE8 and its previous versions. The CSS filters support in Internet Explorer 5.5 – 7.0 is added as follows:

element
{
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
}

or

element
{
filter: alpha(opacity=80);
}

In Internet Explorer 8, the approach is already (finally!) vendor-specific (a lá -moz- for FireFox, -webkit- for Safari and -o- for Opera) and the value is a string in quotes:

element
{
-ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=80)”;
}

The article on the new Microsoft vendor extensions can be found on the official Internet Explorer blog.

Better Image Scaling and Resampling in Internet Explorer

Oddly enough, but the image scaling by using bicubic interpolation turned off in Internet Explorer. All other browsers have this turned on by default, because this is the only normal and expected behavior. Due to this badly chosen default, sometimes the images in Internet Explorer are not displayed as smooth as in other browsers. To fix this you may use the vendor-specific CSS property -ms-interpolation-mode:

img
{
-ms-interpolation-mode: bicubic;
}