Display transparent PNG in IE 5.5 and IE 6

Last update on July 15, 2009 10:35 AM by deri58
Published by jak58

Display transparent PNG in IE 5.5 and IE 6






Display transparent PNG in IE 5.5 and IE 6


PNG transparencies are supported by Firefox, Opera, Konqueror, Safari, Camino, except Internet Explorer 5.5 and 6!
(Internet Explorer 7, supports transparent PNG correctly).

It is therefore particularly difficult, since it requires you:
  • not to use PNG transparencies.
  • to manage 2 versions of web pages.

Solution


Here is a piece of Javascript (2 kb), which allows IE 5.5 and IE 6 to manage transparent PNG.
http://homepage.ntlworld.com/bobosola/index.htm



The aim is to put this piece of Javascript on your site: pngfis.js
http://homepage.ntlworld.com/bobosola/pngfix.js
then add itto your pages:
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->


Its done!!!!

Note that


It is necessary to indicate the size of transparent PNG (width and height) in each tag <img>.

This does not cause any disturbance in other browsers and will not break W3C validation. Only IE 5.5 and IE 6 will use this piece of code automatically.
  • How it works?
    • The end of javascript that is executed by IE 5.5 and IE 6. It uses DirectX to load and display PNG.
  • Limitations
    • There is no solution to the version of IE earlier than 5.5.
Best answers for « Display transparent PNG in IE 5.5 and IE 6 » in :
Redirect to a webpage ShowRedirect to a webpage htaccess Using php header Using a meta tag Using JavaScript Here below you should get an explanantion on how to redirect to a web page using.htaccess or JavaScript htaccess The .htaccess is to be placed in the...
[Latex] [Beamer] Transparent A4 portrait Show[Latex] [Beamer] Transparent A4 portrait Transparencies for A4 portrait with Beamer A small tip , that will be of great use, if you are using Latex, specially with the Beamer class, in order to make transparencies, you may need to...
Error MSHTML.DLL ShowError MSHTML.DLL http://support.microsoft.com/kb/q265244/
Download Registry Easy ShowRegistry Easy allows you to cleanse your Windows registry by fixing errors and by removing invalid entries. It optimizes your computer performance by removing unused files which encumber your disk and slows down your PC. Registry Easy scans your...
Download ParadoxRecovery ShowParadoxRecovery is a powerful tool to convert database paradox.ParadoxRecovery allows you to restore data tables and also create new file . Advantages This application supports the following versions 3.0 , 3.5 , 4.0 , 4.5 , 5 , 6 , 7 , 9 and 10...
ATA, IDE and EIDE ShowOverview The ATA (Advanced Technology Attachment) standard is a standard interface that allows you to connect storage peripherals to PC computers. The ATA standard was developed on May 12, 1994 by the ANSI (document X3.221-1994). Despite the...
Hexadecimal notation ShowHexadecimal notation As binary numbers get longer and longer, a new base had to be introduced: hexadecimal numbering. The hexadecimal number system counts using base 16, so after the first 10 digits come the first six letters: 0, 1, 2, 3, 4, 5, 6,...
Multichannel audio (5.1, 6.1, 7.1) ShowMultichannel audio The term "multichannel audio" refers to the use of multiple audio tracks to reconstruct sound on a multi-speaker sound system. Two digits separated by a decimal point (2.1, 5.1, 6.1, 7.1, etc.) are used to classify the various...