Transparent PNG Image In HTML – Complete Solution Download

by on February 21st, 2008

Advanced & latest versions of browsers support transparent PNG by default. i.e. Internet Explorer 7, New Firefox, Safari and Opera etc. For IE 6 another version of this script works fine in which I gave you an example how to implement transparency in PNG for web pages. But what about background image and what if you have older browser like IE 5.5 etc.

This example covers all issues relating to displaying transparent PNG image in webpage, wether it be image or background and independent of browser.

For this script you will have to take care about following things.

– script tag which calls js file is little bit different with defer type inclusion.
– You will have to attach id to image and CSS as well.
– And a js file of course.

No need to put anything with simple image. Script will automatically identify img tag and if it gets transparent PNG, it will display it transparent. If you have used a CSS for TD which has background and that is PNG. You will assign an id to that TD and with little bit modification in the CSS, you will be able to manage it all.

While using PNG background, give TD exact width and height, in case you want to display it once, otherwise it will be stretched.

Anyways see it for yourself. Nonetheless it is powerful solution. Have fun!

Download Transparent PNG Powerful Example – Cross Browser, Compatible