views:

349

answers:

4

IE5.5+ has supported the CSS attribute "filter" where you convert a color image into grayscale using just CSS.

filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);

Do other browsers support a similar CSS tag without using JavaScript?

+3  A: 

No. Filters are tied to ActiveX.

One example of how to achieve greyscaling in other browsers, but it does use JavaScript.

Ben Blank
A: 

You can check out: http://snipplr.com/view/2836/grayscale-img-with-css-crossbrowser/

I hope it helps. I would still recommend using server-side for image manipulation, or Photoshop.

meep
Great alternative.
That does not appear to actually work. The image is covered by a 20% grey box, but the colors are still present, just slightly muted.
Ben Blank
I wanted to delete this post after I tested it. But he accepted it too quickly. And now I suffer from down votes. Oh well.
meep
+1  A: 

No they do not. Realistically you shouldn't be using those in cross-browser web development unless it is to make IE work in ways the other browsers don't. The obvious example is PNG support.

Paulo
A: 

I'm pretty sure Opera supports some of the MS stuff. Haven't been able to find out exactly what parts they do support.

DisgruntledGoat