IE Transparency Hack

Internet Explorer has flawed PNG handling, meaning that alpha-transparent PNGs have a flat grey background. Fortunately there is a way to fix this - by applying a DirectX filter to PNG images.

If you want further details about the technical stuff, Google will no doubt provide you with them. If you simply want to know what you need to do to fix it, you're at the right place.

  1. Download and extract iepngfix.zip (1.2KB), which contains two files: iepngfix.htc and trans.gif
  2. Set the CSS behavior of any relevant tags to the HTC file. Like this:
    <!--[if lt IE 7]><style type="text/css">img{behavior:url('iepngfix.htc');}</style><![endif]-->
  3. Either ensure the trans.gif file is in the same directory as the HTC file, or edit line fourteen as appropriate.



Back to MiniEmotes



©2006 Peter Boughton. All Rights Reserved.