Gradient CSS background

Insert the following code to your website's style sheet to make its background gradient with CSS3. For non-CSS3 browsers the background will be only one color. This style can be used for any HTML element div, li etc.

If you are not familiar with CSS, you can set the colors by changing these HEX values #999, #CCCCCC, #000000.

Just for the record, in HEX values you can use only numbers 0-9 and letters A-F. The color palette starts with white #FFFFFF and ends with black #000000.


  background: #999; /* for non-css3 browsers */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#CCCCCC', endColorstr='#000000'); /* for IE */
  background: -webkit-gradient(linear, left top, left bottom, from(#CCCCCC), to(#000000)); /* for webkit browsers */
  background: -moz-linear-gradient(top,  #CCCCCC,  #000000); /* for firefox 3.6+ */ 

Demo »


Related articles

Redirect www to non www with .htaccess RewriteRule

Redirect www to non www with .htaccess RewriteRule


Redirect your websites visitors from to without www.

Unordered List Style Image CSS

Unordered List Style Image CSS


Learn how to style UL with any image using CSS.

OL and UL List CSS Style

OL and UL List CSS Style


Styling ordered and unordered lists is easy. Just write a single line of CSS to change the list style type.

Leave a comment

We welcome any comment from you! Please keep in mind that comments are moderated and rel='nofollow' is in use. So, please do not use a domain as your name or a spammy keyword, or your comment will be deleted.

Name: *

E-mail: *

Message: *

Click on the car *

Find us on Facebook



Back to Top