the (in)famous IE PNG bug

i spent some time researching this topic with my old friend google. here’s what i found: this is an original post at msdn about the function which is used in the following css class.

#myDivClass {
float:left;
width:100px;
height:100px;

// good browsers (everything except ie) ignore this line:
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src=’images/file.png’);

background-image:url(images/file.png)!important;

// underscore makes good browsers ignore the following line. it is required to disable the display of the background image. the filtered image is beeing displayed on top of the regular background property.
_background-image:none;
}

as always, this is an ugly hack. be aware that the use of filters for ie may also affect other functionalities (links may stop working and it could affect overlapping classes etc). visit another page on this topic for more insightful hints. there’s also a long article on a list apart dealing with this topic. good work, microsoft, you look even worse than before ..

This entry was posted in design, my five cents, web and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free