Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PNG image fix

Featured Replies

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

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!

  • 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 :(

  • Author

Ahh, nvm I got it working ;)

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.

I can't get any of those to work for me... is it because I'm using PNG24 rather than PNG8 ?

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 :/

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.

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!

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?

  • 1 month later...
  • 2 weeks later...

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.