Linear gradient in Chrome and Safari browsers

codelove picture codelove · Jul 27, 2012 · Viewed 72.3k times · Source

I am having trouble showing a linear gradient in Safari and Chrome. In Firefox it shows up fine.

I am trying:

background: -webkit-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;   
background:    -moz-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;
background:     -ms-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;
background:      -o-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;

Thanks you for your help.

Answer

Zoltan Toth picture Zoltan Toth · Jul 27, 2012

Try this - http://jsfiddle.net/fwkgM/1/

  background-color: #9e9e9e;
  background-image: linear-gradient(to bottom, #9e9e9e, #454545);

CSS3 Please