DD_belatedPNG, help?

I stumbled across a great png fix for IE 6: which can be found on this page.

The script seems to be working great, but it shows an error ‘this.imgSize[…].width’ is null or not an object. However, the script is indeed doing it’s job and all transparent pngs are rendered as intended and unlike most scripts - its rendering them fast even with lot of images + allows background repeats and position, but because of this JavaScript error some other JS scripts below it are not running - otherwise I’d have ignored this.

I’m not a JS expert - I tried to see what the problem might be, but the complex code made no sense to me. So, I figured this error might be popping up because some images and css backgrounds doesn’t have fixed width in them - so as an experiment I added width to all the appropriate elements, still same error, I tried inline width - still no luck.

The script works perfectly for me and faster than the htc alternative. Got any suggestions?

Note: I tried emailing the author, no response.

I received the same error. Not sure our scenario is the same, but possibly this will help.

Right or wrong, I applied the fix to everything using this code:


This previously worked on dozens of sites to quickly fix IE6 PNG support. The difference with the site that the error appeared was that it had a background image on the html tag. Once I removed the background image, the error went away.

Another approach that worked was to add “body” before the “*” in the PNG fix:

DD_belatedPNG.fix('body *');

Hope that helps you and anyone that stumbles upon this.