PNG transparency on IE

PNG is a very popular image format in websites, especially used to offer image transparency. In combination with JQuery fade effects, it can generate very pretty animations. However, Internet Explorer doesn’t render transparent PNGs as expected leading to a really bad looking result.

While searching for a solution to make IE to properly support the transparency effects, I came across this nice CSS fix:

img{
background: transparent;
-ms-filter: “progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)”; /* IE8 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);   /* IE6 & 7 */
zoom: 1;
}

Source link: http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/thread/10354468-0d88-4689-8d2a-c534f77f4779

Share and Enjoy:
  • Print
  • Facebook
  • Digg
  • Twitter
  • StumbleUpon
  • del.icio.us
  • LinkedIn
  • Google Bookmarks