Click to See Complete Forum and Search --> : PNG alpha fix doesn't work...


eaglegfx
09-05-2007, 01:38 AM
A site I recently worked on uses a lot of PNG graphics due to the nature of the design and the pretty heavy use of partially transparent gradients. Of course, using PNG's mean running into problems with older versions of IE not displaying them correctly.

Usually I am able to fix this problem with a simple Javascript hack. However, for some reason it isn't working on this site. Furthermore, any of the other Javascript hacks I find online do not work either.

This is specifically in relation to IE version 6. If anyone has any ideas I would greatly appreciate it! Here is the address to the web site:

http://www.acorndistributors.com/

Thanks!

Centauri
09-05-2007, 07:46 AM
The "ie7"javascript is preconfigured to only process png files that end with "-trans.png" - you need to set a global variable if your png's don't end that way, as per the notes http://dean.edwards.name/IE7/usage/configure.html#png-suffix and this post (https://sourceforge.net/forum/forum.php?thread_id=1790751&forum_id=379297)
<!--[if lt IE 7]>
<script language="Javascript" src="library/ie/ie7-standard-p.js" type="text/javascript"></script>
<script language="Javascript" IE7_PNG_SUFFIX = ".png"; type="text/javascript"></script>
<![endif]-->

Kravvitz
09-05-2007, 05:19 PM
Umm... Centauri, I think you mean this:
<!--[if lt IE 7]>
<script src="library/ie/ie7-standard-p.js" type="text/javascript"></script>
<script type="text/javascript">IE7_PNG_SUFFIX = ".png";</script>
<![endif]-->

Centauri
09-05-2007, 05:26 PM
Uh, yeah - thats what I get for cutting and pasting whilst tired ........ :)

WebJoel
09-07-2007, 06:35 PM
Gosh how I loathe IE!!! :mad:

eaglegfx
09-11-2007, 07:41 PM
Thanks guys for your help. Don't know how I missed that :rolleyes: Haven't had a chance to check it out in IE but I'm pretty confident that will resolve the problems.

And boy do I hate IE as well ... don't know why Windows can't have a standards-compliant browser. Sites will look good in every other major browser except for IE ... SO frustrating!

Thanks again!