Monday, October 22, 2007

Fingertips and .png files for transperancy

I cut off the tip of my finger yesterday, so todays post will be nice and short. PNG files are my favorite file type to create transparent images. PNGs are much better than .gifs and they don't add those crazy lines around them like .gifs do, but some versions of IE don't support .png files, so you have to use this little work-around.

#header { background:url(header.png); }

All you have to do is apply the background behavior to the #header element:

Also,

img, #header { behavior: url(iepngfix.htc); }

You can do this with every element you’e using PNG transparency on:

img, #header, .class, blockquote { behavior: url(iepngfix.htc); }

The asterisk works too,

* { behavior: url(iepngfix.htc); }


I hope you find this little work-around helpful, I should be back in full force when I can take this bandage off.

No comments: