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.

CSS

html{
  height:100%;
  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 »


Go Daddy


Related articles

Redirect www to non www with .htaccess RewriteRule

Redirect www to non www with .htaccess RewriteRule

05/12/2015

Redirect your websites visitors from www.domain.com to domain.com without www.

Unordered List Style Image CSS

Unordered List Style Image CSS

06/03/2013

Learn how to style UL with any image using CSS.

OL and UL List CSS Style

OL and UL List CSS Style

03/03/2013

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 flower *


Find us on Facebook

Tags

Get online with the world's Best - GoDaddy.com!

Back to Top