Jump to Navigation

Drupal PNG transparency fix for IE

Drupal PNG transparency fix for IE

I only recently discovered about Internet Explorers non-existent handling of transparent PNGs. It only effects versions 5.5 and 6, but there are still a surprising amount of people using these outdated browsers so it's important not to forget them. There has been a fix around for some time - the aptly named, pngfix.js. Now, there is also jquery version of the png fix.

Luckily for us Drupalers, the jquery library hasalready been wrapped up in a nice little Drupal module called pngfix. It's really easy to use. Simply download and install the module in the usual manor and browse to it's configuration page. From there, you can make a comma separated list of class names that you would like the png fix to be applied to. You must include the '.' in the class names, eg .pngfix

To use it, simply add one of the css classes that you specified in the configuration page to the containing element of an image, not to the image itself.

As long as your Internet 5.5 or 6 viewers have Javascript turned on, they will see your PNG images the same way everybody else does.

Please share your thoughts, comments and suggestions...

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
If you have your own website, enter its address here and we will link to it for you. (please include http://).
eg. http://www.kirkdesigns.co.uk