I am using this as a background for one of my divs and declared a vendor prefix for all:
background: -webkit-linear-gradient(center top , #F6F6F6 0%, #FFFFFF 100%) repeat scroll;
background: -moz-linear-gradient(center top , #F6F6F6 0%, #FFFFFF 100%) repeat scroll;
background: -o-linear-gradient(center top , #F6F6F6 0%, #FFFFFF 100%) repeat scroll;
background: -ms-linear-gradient(center top , #F6F6F6 0%, #FFFFFF 100%) repeat scroll;
background: linear-gradient(center top , #F6F6F6 0%, #FFFFFF 100%) repeat scroll;
However, it doesn't in Chrome. My div becomes transparent instead (because it doesn't recognize a background at all). My Chrome version is Version 29 which is supposed to be up to date.
Did I do anything wrong?
As already mentioned in the comments,
center
is an invalid property forlinear-gradient
. For an in-depth look at the syntax, the Mozilla Developer Network covers this pretty well:top
,bottom
,left
andright
are the only properties the<side-or-corner>
parameter accepts.If you're unable to work the gradient manually, there are various online tools which can help you create the gradient you're looking for, one of the better ones is Colorzilla's Ultimate CSS Gradient Generator.