views:

178

answers:

4

Hi

Does anyone know the vendor prefix for gradients within IE9 or are we still supposed to still be using their proprietry filters?

What I've got for the other browsers is:

background-image: -moz-linear-gradient(top, #444444, #999999); /* FF3.6 */
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #444444),color-stop(1, #999999)); /* Saf4+, Chrome */
filter:  progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999')"; /* IE8 */

As a bonus does anyone know Opera's vendor prefix as well?

Cheers

Sniffer

+2  A: 

Not sure about IE9, but Opera doesn’t seem to have any gradient support yet:

No occurrence of “gradient” on that page.

There’s a great article by Robert Nyman on getting CSS gradients working in all browsers that aren’t Opera though:

Not sure if that can be extended to use an image as a fallback.

Paul D. Waite
That surprises me, as Opera are usually at the forefront of implementing the standards. Thanks for the answer Paul.
Sniffer
Paul D. Waite
Oh: you’re most welcome, by the way.
Paul D. Waite
+3  A: 

You still need to use their proprietary filters as of IE9 beta 1.

Gaurav
Bummer! Not the answer I wanted, but thanks anyway.
Sniffer
A: 

I understand that IE9 still won't be supporting CSS gradients. Which is a shame, because it's supporting loads of other great new stuff.

You might want to look into CSS3Pie as a way of getting all versions of IE to support various CSS3 features (including gradients, but also border-radius and box-shadow) with the minimum of fuss.

I believe CSS3Pie works with IE9 (I've tried it on the pre-release versions, but not yet on the current beta).

Spudley
Thanks Spudley. I'm using CSS3Pie on IE6 to 8, but I was hoping to get away from using it on IE9! I've got a separate stylesheet for each IE with my CSS3Pie styles in the IE8. As long as gradients is the only thing missing from the CSS3 I currently use, I'll be adding another stylesheet for IE9 without using CSS3Pie if I can get away with it.
Sniffer
A: 

Just FYI, Opera's vendor prefix is -o- :)

hallvors