Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

CSS3 Firefox not recognizing my liner gradient color

CSS3 Firefox not recognizing my liner gradient color

Problem

Im trying to use this code in css to display a linear gradient background but Im not sure why firefox is not displaying it..

body
{
height: 100%;
/*background-color: #F0F0F0;*/
background-repeat: repeat-x;

/* Safari 4-5, Chrome 1-9 */
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#C0C0C0), to(#F0F0F0));

/* Safari 5.1, Chrome 10+ */
background: -webkit-linear-gradient(top, #C0C0C0, #F0F0F0);

/* Firefox 3.6+ */
background: -moz-gradient(top, #C0C0C0, #F0F0F0);

/* IE 10 */
background: -ms-linear-gradient(top, #C0C0C0, #F0F0F0);

/* Opera 11.10+ */
background: -o-linear-gradient(top, #C0C0C0, #F0F0F0);
}

Im not sure what is my problem.. I have tried different ways changing top, bottom, putting % but still is not working.. I will really appreciate any help..

Problem courtesy of: JV17

Solution

  1. No need for the background-repeat property on gradients as gradients fill the entire y- and x-axis of whatever element it is applied to (unless your background is a pattern, in which case you may want to change other parts of your code,) and

  2. -moz-gradient is incorrect, it should be -moz-linear-gradient

Solution courtesy of: Jace Cotton

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

CSS3 Firefox not recognizing my liner gradient color

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×