Tuesday, April 10, 2007

CSS PNG Transparency Hack

Al showed me today that IE has this problem of not being able to display the alpha channel of a PNG properly. Basically he has div tag which is styled to having a PNG as its background.

Here is his workaround:
He also told me that anything that is prefixed with * will be recognized by IE but not other browsers. e.g. *background: none;

I found this article which has an extensive list of hacks & filters:
http://centricle.com/ref/css/filters/


style="position:relative;
height:250px;
width:250px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
(src='dimage.png', sizingMethod='scale');">




No comments: