Create and Use a Graduated .PNG Image

Create the image

  1. Create a new document with a width of 10px and a height equal to your site's maximum height (use 900px if you aren't sure), in RGB color mode and 72 pixels per inch with transparent background.
  2. Set the foreground color to white.
  3. Set the gradation tool to change from white to transparent.
  4. Using the Gradation tool, draw a gradation line from top to bottom.
  5. File->Save the file as .psd so you can edit again later.
  6. File->Save for the Web.
    • Reduce the width to 1px or so, to reduce file size.
    • Choose .png for true transparancy.
      • Watch the file size; it may be too big to meet your requirements.

Add the image to your Cascading Style Sheet (CSS)

body {background-image:url(white-gradation.png); background-color:#993300}

Remember that text cannot be easily read on a high-contrast background, so use other means such as boxes to provide a reading surface.

Variations

Super-Easy Blendy Backgrounds
Matthew O'Neill of A List Apart.
Cross-browser semi-transparent backgrounds
DaltonLP
Cross-Browser Variable Opacity with PNG: A Real Solution
by Michael Lovitt, A List Apart
Scalable CSS Buttons using PNG and Background-colors
David's Kitchen
Gradient Image Maker
Dynamic Drive