views:

28

answers:

2

Hello,

I want to add a gradient background to my web page (the area marked with yellow border is where the actual content is displayed) and I want it to take just 1/2 of the page (the bottom part): alt text

I believe this is possible with CSS, but so far I have only managed to get a gradient background (taking the whole height of the page).

Thank you very much in advance!

+1  A: 

You can do it with something like this:

#background {
background: url('GRADIENT-IMAGE-URL') 50% center THE-KIND-OF-REPEAT;
height: THE-HEIGHT;
width: THE-WIDTH;
}

50% here means that the background image will be positioned 50% from the top.

Maher4Ever
Hmm.. thanks but it didn't have the desired effect.
Hristo
A: 

This is the solution that I have managed to work out eventually:

background: url('IMAGE-URL') bottom repeat-x;  
Hristo