Home Web Design Services Guides Network Links Search Contact
Gradient Background

Gradient Background | Image Maps | Interactive Site | Protect Email Address | Rollover Animation | Rotating Banners | Textlink-shaker | Website Navigation

EN RO

Home
Up

Member of:
Internet SocietyISOC
IWA
ARTT
Romanian Telework SocietyRTS

How to Make a Gradient Background

Gradients are colors that blend into each other to form an ongoing color shift. This effect is highly appealing, and used generally in graphic design, rather than with Web pages. However, a simple style appended to your page's Body Tag can create a very nice gradient fill to form a background to the page.

This style can be applied to your entire page by using it within the Body Tag, or you can choose to add fills to tables by employing the same code with your Table Tags.

Consider the following code for use in your body tag to add a gradient to the whole page:

<body style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#ccffcc', startColorstr='#FFFFFF', gradientType='0');"></body>


Now transport this to an HTML table (note how we reversed the color order for the table):

<table style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#ffffff', startColorstr='#ccffcc', gradientType='0');"><tr><td>adfad<br><br></td></tr></table>

 

adfad



Remember, the gradient runs from one color to the other, so you want to have highly contrasting colors for your two input values to take advantage of the full effect. Also note the gradientType, which is specified in our example as "0". This produces a vertical blend. If we set this value to "1" we get a horizontal gradation.

Google

Web Site

Tip-Top-Hot Web Sites



Home Up Next

 

Privacy Policy | Terms of Service
© 1999 - 2008, MultiMedia SRL
Send articles and materials to be published on this website to: Publishing
If you see unauthorized or illegal materials on this website, please send an e-mail to: Abuse