I am using a PNG file on www.leftystrats.com and want to use the PNGfix code. I found a script at http://snipplr.com/view.php?codeview&id=4251. Here is the code: I have little experience with javascript, so I was wonder what need to go into that javascript file. My PNG image is 429 x 126px and located at http://www.leftystrats.com/logo.png.
You don't need any further modifications inside the code. Create new file named pngfix.js and paste the script content into it. Copy that file into "scripts" folder. Then in your html page edit the head tag and add the <script> tags to include the js file. Your head tag should look like this: <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Left Handed Stratocasters - Lefty Guitars, Parts, & Forum</title> <meta name="keywords" content="Lefty, Left Handed, Fender Stratocaster, Southpaw, Mexican, Deluxe, American, Strat, Custom Shop" /> <meta name="description" content="Find or build the Lefty Stratocaster of your dreams." /> <style type="text/css"> <!-- body { background-image: url(BackGround.jpg); } --> </style> <link href="Lfont.css" rel="stylesheet" type="text/css" /> <script language="JavaScript" type="text/javascript" src="scripts/pngfix.js"></script> <!--[if lt IE 7]> <script defer type="text/javascript" src="scripts/pngfix.js"></script> <![endif]--> </head> Code (markup): It is mentioned that the image should have dimensions declared, and your logo has width and height defined, so it should be ok. Personally, i don't like that solution or any other js based solution, this one will probably mess with all png images on the website, i would rather just replace the png logo with gif one.
If you're still having problems, try this: http://www.devpub.com/making-png-images-transparent-in-ie6-t2.html It's the one I use; there's only one issue to it: if you have a few good hundred PNG graphics in a single page, it's going to slow down the loading time in Internet Explorer because the JavaScript has to go through all those graphics.