Nov
16

Global PNG fix

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 2.67 out of 5)
Loading ... Loading ...

Waaaaah! Waaaaaah! You hear that? That’s IE6 whining about how you should be using an obtuse “filter” attribute, causing all those nice, pretty pngs on your page to go whacky. Fortunately for you, we got just the thing to shut it up. Give it just the tiniest dose of our Unit PNG Fix and bask in the the glorious phosphoresence of your png images once again! While this is not the only png fix out there (in fact, it was inspired by Drew McLellan’s supersleight), here’s why it will be the last one you need to download:

How to Do it

Step 1

Download the Zip folder then Extract to ZIp.

Step 2

you Get 4file like this

Step3

Next, add “clear.gif” to your images folder

Step 4

Copy and pest unitpngfix.js in your website folder. then open unitpngfix.js. On the first line, make sure that the path correctly points to “clear.gif”

Step 5

Copy and pest this code before finish head tag.

HTML: Select All

      <!--[if lt IE 7]>
      <script type="text/javascript" src="unitpngfix.js"></script>
      <![endif]-->

A couple of things to note:

Unit PNG Fix will work with the CSS background-repeat attribute… kinda. It does not work like background-repeat should [IE6’s filter property doesn’t allow that], but Unit PNG Fix does read the element’s CSS, and if it is using a background-repeat, the image will be stretched to fill the element background. This isn’t ideal, but it is all that can be expected of the filter property.


Leave a Reply

Tag Cloud

Categories

Archives