PDA

Click to See Complete Forum and Search --> : How to have a blended background color?



FlashLackey
03-04-2007, 12:04 AM
Can anyone tell me how to create a blended background color like in the following sites:

http://www.gotoandplay.net/
http://www.msn.com/

I tried looking at the source. But, HTML not being my native tongue, I couldn't decipher it.

Any help would be greatly appreciated!

catbert303
03-04-2007, 07:25 AM
Hi,

In photoshop (or whatever image editor your prefer) create a tall narrow image (e.g. 5px wide, 600px high) and make a gradient fill from top to bottom.

Now in you can use CSS to have this image as the background of your page,


<style type="text/css">
body {
background: #ffffff url(path/to/your/image.gif) repeat-x 0 0;
}
</style>

where the colour #ffffff matches the colour of the bottom of your gradient image.

aversion
03-04-2007, 05:42 PM
To illustrate, this is the background image they use on that first site:

http://www.gotoandplay.net/images_html/bg_gradient.jpg

FlashLackey
03-04-2007, 06:11 PM
thank you. thats a nice trick. it worked great.