user1269625
user1269625

Reputation: 3209

CSS background-color not working in chrome

I got this background-color here

-moz-linear-gradient(center top , #0043A1 0%, #0043A1 100%) repeat scroll 0 0 transparent;

but it will not work in google chrome, any ideas on how to fix it?

Thanks, J

Upvotes: 0

Views: 2356

Answers (2)

user1634459
user1634459

Reputation:

Use this for Chrome and Safari browsers:

-webkit-linear-gradient

And use this for Mozilla (Firefox):

-moz-linear-gradient

You might like the site CSS3Please! which lets you see how to apply all these various properties, and generates the code for all browsers (even Opera, which most people often forget but which they really really shouldn't. So sayeth a diehard Opera user.) There's also ColorZilla's Gradient Generator, which I've found to be a little less intuitive...but it does generate the CSS styledefs as well.

Upvotes: 0

Denys Séguret
Denys Séguret

Reputation: 382132

Replace with

linear-gradient(center top , #0043A1 0%, #0043A1 100%) repeat scroll 0 0 transparent;

-moz-* css properties are specific to mozilla. They're useful while a property isn't normalized but now (with CSS3) you may use the standardized linear-gradient.

Even the Mozilla documentation now documents linear-gradient.

Upvotes: 2

Related Questions