Set the background to a gradient using CSS

Set the background to a gradient using CSS

This tutorial has the code need to make a gradient background using CSS, this can be used for the body or a table background

The code to set the background as a gradient is this:

background-color: #F8F8F8;
filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#CCCCCC' ,endColorStr='#E6E6E6' ,gradientType= '0' );

The background-color is needed for Firefox as this seems to be unsupported in Firefox.

The rest of the code is self explanitory you have the start colour and the finish colour and the gradientType.

When the gradientType is set to 0, it is vertical from top to bottom.

When the gradientType is set to 1, it is horizontal from left to bottom.

If you are viewing this site within Internet Explorer or an IE based browser, the title bar has its own gradient.