views:

30

answers:

4

I have a sprite that I'm using for rounded corners. The left corner sits on top of a gradient background, but the right corner sits on a white background. I don't want to have to put the images on the page as I'd rather have them in a sprite and just move the placement through the background property.

Will something like pngfix not work if the png is not in the markup?

Edited to incorporate OP's clarifications (posted in an answer, below) into the question:

Sorry, meaning will something like pngfix apply to png's that are in a CSS file or only when it's in the markup:

<img src="myimage.png" class="png" />

etc...

A: 

Yes, by adding the following line all your to your CSS background-PNG rules:

behavior: url(/pathto/iepngfix.htc);
thomask
A: 

Sorry, meaning will something like pngfix apply to png's that are in a CSS file or only when it's in the markup:

<img src="myimage.png" class="png" />

etc...

Peter
Please add details into the original question, rather than creating an 'update' answer. Click on the 'edit' link below the question's tags to do so.
David Thomas
+1  A: 

Yes, the pngfix.htc script will apply to both markup and css background images.

However, the more recent DD Belated PNG fix is the better option as it addresses more things than the older pngfix (namely, positioned and repeating backgrounds):

http://www.dillerdesign.com/experiment/DD_belatedPNG/

Andrew Vit
A: 

NOT GOING TO WORK

The png hack will not work on any image that has a position property in css. So basically your out of luck with sprites, unless you use a gif.

You can get pngfix to work on images in CSS and HTML. However, they can't be positioned.

If you want to fix pngs on IE6 you should read this article too.

http://24ways.org/2007/supersleight-transparent-png-in-ie6

MIGHT GO OK

Check out Andrew Vit's Suggestion.

Thorn007