
DD_belatedPNG: Medicine for your IE6/PNG headache - jeff18
http://www.dillerdesign.com/experiment/DD_belatedPNG/
======
adriand
This library, and the jQuery Supersleight plugin (there's also a non-jQuery
version) are probably the best IE6 PNG "fixers".

However, in my experience you would be better off designing for this issue
from the outset and avoiding the use of these libraries if you care about your
layouts looking good in IE6. For simple situations, these can work fine,
however you'll run into issues for anything beyond the basics. For example, in
this library:

> "Fixed" <IMG/> elements must take on visibility:hidden;, and thus become
> unclickable. I see no workaround other than using clear pixel GIF
> replacements, and that is code that I am not going to write.

There go your buttons.

I've also encountered issues where sometimes, replaced images take on a
different height and get stretched, but this behaviour is unpredictable.

Your best bet for dealing with transparent PNGs in IE6 is either to stop
caring about IE6 and leaving IE6 users with the opaque backgrounds around the
images, or switching to transparent GIFs. A good designer can produce
transparent GIFs that are just as crisp as PNGs, and then you don't need to
rely on hacks any more.

~~~
qeorge
_However, in my experience you would be better off designing for this issue
from the outset and avoiding the use of these libraries if you care about your
layouts looking good in IE6._

Strongly disagree. "Designing from the outset to avoid these libraries" means
avoiding alpha-channel transparency altogether. That's a ridiculous design
limitation just to satisfy IE6 users who also have JS turned off.

 _> "Fixed" <IMG/> elements must take on visibility:hidden;, and thus become
unclickable. I see no workaround other than using clear pixel GIF
replacements, and that is code that I am not going to write.

There go your buttons._

This is easily worked around by using <a>'s or <button>'s with background
images.

------
pohl

       <!--[if IE 6]>
    

GWT has a wonderful, automatic mechanism for this workaround built into its
ClientBundle (nee ImageBundle) facility. One especially great thing about it
is that the compiler properly omits it for all browser permutations except for
IE, so that FireFox or WebKit-based browsers never need to evaluate the above
conditional expression...because the code just isn't there if it's not needed.

~~~
pwmanagerdied
Maybe this is just semantics, but the others browsers wouldn't be evaluating
them either, since they're comments and only IE looks for the conditionals,
neh?

~~~
pohl
That's a good point. What I meant to say was that the other browsers don't
have to download it.

------
GvS
IE 6 market share is slowly decreasing, but it's still around 10%:
<http://www.w3schools.com/browsers/browsers_stats.asp>

------
atambo
How do people handle including this javascript within an IE conditional
statement in rails? Is there a way to handle it with rails helpers or do
people just add it to their views manually?

------
cemregr
Why don't you just use 8-bit alpha-PNG's?

Works in all browsers, degrades gracefully on IE6 (semitransparency becomes
fully transparent), smaller file sizes as a bonus.

------
Zarathu
While this is very cool, people have been using this for years.

~~~
emil0r
There's always someone that's missed it. Highly recommended library for ie6 +
png.

