Friday, August 31, 2007

Fix PNG image in IE

Hey! I just found a technique how to fix a png image in IE using AlphaImageLoader. Here are some links about this issue:
http://www.pcmag.com/article2/0,1759,1645331,00.asp
http://msdn2.microsoft.com/en-us/library/ms532969.aspx

Here is my function that I developed, it works when you use div for png image:

function fixPNG(element, src) {
$(element).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
}

No comments:

Subscribe in a Reader