Transparent PNG Fix for IE 5.5 & 6


/ Published in: CSS
Save to your folder(s)

This is an excellent solution for fixing IE 6's inability to display transparent PNGs correctly.

Step 1: Include the following conditional comment the HEAD area of your document. You will need to update the CSS selector and also the path to whereever you put the .htc file.

<!--[if lte IE 6]>
<style type="text/css">
  img { behavior: url(/css/iepngfix.htc) }
</style>
<![endif]-->

Step 2: Create a transparent GIF that's 1x1 and save it as blank.gif in your images folder.

Step 3. Copy the source below and save it in a file called iepngfix.htc and place it in your CSS folder. Note, you may need to update the images folder to match the folder you're using on your site.

That's it. Once you have everything in place and assuming everything is referenced correclty, PNG transparency will work in IE 6.

URL: http://www.twinhelix.com/css/iepngfix/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.