Reputation: 9855
I have a few buttons on my page that are styles using sprites, in ie6 however with the 'UNIT Png fix' http://labs.unitinteractive.com/unitpngfix.php my sprites no longer work and there stretched to fit the container, Doesn anybody know if there's a png fix out there to work with sprites? Thanks
Upvotes: 2
Views: 175
Reputation: 9705
you can fall back to a gif sprite background for IE6.
.myClass {
background-image: url(img.png);
}
.ie6 .myClass {
background-image: url(img.gif);
}
you can get the .ie6
class on your <body>
by following the html5boilerplate approach.
EDIT
or add the IE6 override to a conditional css file:
<!--[if lte IE 6]><link rel="stylesheet" href="ie6.css" /><![endif]-->
credit to @lucideer, see comment below
Upvotes: 3
Reputation: 2307
In short, no there isn't. I ran into the same issue recently and I just created a GIF from the standard PNG and used an IE6 stylesheet to use the GIF. That way sprite positioning is still supported. This solution's viability depends on your design and how much transparency is needed. In some cases you can put the background in the gif where necessary, but I personally wouldn't worry too much about IE6
Upvotes: 0