June 4, 200818 yr Hey, I thought this topic would have been done already but I can't find one so here go's... What is the best fix for PNG images in IE? I seem to have become a big fan of PNG and my website looks a real mess in older versions of IE lol Thnx
June 4, 200818 yr I assume this is referencing the lack of support for transparency? The only fix I have experience with is the javascript solution - pngfix.js, found and explained here: http://homepage.ntlworld.com/bobosola/pnghowto.htm It works ok though it has made ie6 hang in the past. If you call it with a conditional to only appear for browsers pre-ie7, you can avoid any unnecessary loading in other browsers. Interested to hear if anyone else has a different/better solution!
June 4, 200818 yr Author I assume this is referencing the lack of support for transparency? The only fix I have experience with is the javascript solution - pngfix.js, found and explained here: http://homepage.ntlworld.com/bobosola/pnghowto.htm It works ok though it has made ie6 hang in the past. If you call it with a conditional to only appear for browsers pre-ie7, you can avoid any unnecessary loading in other browsers. Interested to hear if anyone else has a different/better solution! Funny you should mention that one, I have just been using it and it seems to do more damage than good. It doesnt solve my problem and also stops my background from displaying
June 5, 200818 yr Glad you've got it working. For anyone else looking, I use the fix at http://www.twinhelix.com/css/iepngfix/ which seems to do the trick for me. Uses CSS behaviours.
June 5, 200818 yr I assume this is referencing the lack of support for transparency? The only fix I have experience with is the javascript solution - pngfix.js, found and explained here: http://homepage.ntlworld.com/bobosola/pnghowto.htm It works ok though it has made ie6 hang in the past. If you call it with a conditional to only appear for browsers pre-ie7, you can avoid any unnecessary loading in other browsers. That's the one I've used in the past without problems. It was for using 16-million colour PNGs with full alpha transparencies in IE6. (IE7 and Firefox are fine). I uploaded the pngfix.js file to my server, and then simply added this code in the style sheet to specifically target those with IE6: <!--[if lt IE 7.]> <script defer type="text/javascript" src="pngfix.js"></script> <![endif]--> All the other workarounds I tested brought up the golden bar in IE due to needing to run an active-x control, so I ditched those ones.
June 6, 200818 yr Me too, I've started using http://homepage.ntlworld.com/bobosola/pnghowto.htm with no probs.
June 9, 200818 yr I can't get any of those to work for me... is it because I'm using PNG24 rather than PNG8 ?
June 9, 200818 yr Got pretty sick of this and ditched the idea - all of the fixes that claimed to work with PGN24 and background images just didn't work :/
June 9, 200818 yr PNG24, just to clarify you mean 16-million colour (24-bit) PNGs, as opposed to just 256-coloured (8-bit) ones? I've been using the JS fix with 16-million colour PNGs which have full alpha transparency with no probs.
June 9, 200818 yr Same for me - only ones I'm concerned about are background images, which I can't get to work. And yes. My paths are correct thanks!
June 11, 200818 yr Ok, the effect doesn't work when Javascript is disabled within the browser (obviously). What is the default for Javascript on IE6, Enabled or Disabled? Does the user also need to have downloaded/installed Java Runtime for this JS script to work?
June 13, 200818 yr Got another one that apparently works on everything except repeating background images, but I haven't tried it yet http://www.incapeverde.com/css/ie6.css
July 22, 200818 yr Annoyingly the pngfix I used to use doesn't work on a new site I'm doing...bizarre. Anyway, I used this one - http://www.twinhelix.com/css/iepngfix/ - as Joff mentioned above and it does the job on IE6. I'm using a PNG24 on a div background image.
August 3, 200818 yr I've also suffered problems with alpha PNGs with my previously used fix. Found a solution that nailed it: http://24ways.org/2007/supersleight-transparent-png-in-ie6 I know how annoying it is to try and dissect it when you just want to actually make it happen, so in short: • Download the javascript fix named SuperSleight • Unzip. There are three files in there. You only need two of them (x.gif and supersleight-min.js). • Upload "x.gif" to your web directory • Open "supersleight-min.js" using Notepad++. • The third line down will be "var shim='x.gif';". Change "x.gif" to the full URL of x.gif that you just uploaded to your web directory. • Save supersleight-min.js and upload to your web directory. • Copy and paste all of the below somewhere into the <head></head> section of your webpage: <!--[if lte IE 6]> <script type="text/javascript" src="supersleight-min.js"></script> <![endif]--> • In the above code, change "supersleight-min.js" to the full URL of supersleight-min.js that you just uploaded to your web directory. That's it! I think the two "supersleight.js" and "supersleight-min.js" files are identical. The former is displayed nicely for easy reading and reference purposes with descriptions for the web programmer, where the latter is with everything collapsed (with all spaces and descriptions erased) for a slightly smaller/faster file download for web use.
Create an account or sign in to comment