Transparent PNG plus pngfix.js

A couple weeks back I mentioned that I used this JavaScript hack to enable IE to see transparent PNG’s in the way I wanted them to be seen (you know, with transparency). I should mention that I had to back out that change because pngfix.js mucks with the DOM by wrapping the <img...> tag in a span and then moves the id attribute of the image to the span. Bottom line: if you use pngfix.js and then try to manipulate an img tag that contains a PNG, you’ll need to remember that the image element with id = x will not be an image element at runtime, it’ll be a span that contains an image.

Leave a Reply

Your email address will not be published. Required fields are marked *