I'm reworking a site and changing some colors around and I've decided to
remove some backgrounds from images and resave everything as transparent
PNGs. In my stylesheet I've got the following to allow older versions of IE
to properly display PNGs:
 
img.png {
    background-image: expression(
        this.runtimeStyle.backgroundImage = "none",
        this.runtimeStyle.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',
sizingMethod='image')",
        this.src = "/images/blank.gif"
    );
}

I've been using it for a long time so there's a possibility it's outdated.
Maybe there's a simpler way that would also solve my problem?

But, my main problem is that when I do this in the stylesheet:

#index #content {background: url(/images/welcome.png) top left no-repeat;}

I can't apply class="png" like I would with an inline image. And it would be
quite cumbersome to add all that crap in img.png to every id or class in my
stylesheet that uses PNGs.

What's the easy and/or best way (hopefully the same answer for both easy &
best) of handling this?

Thanks,

Mike

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to