View Full Version : How do I do this in CSS?

08-12-2010, 01:45 PM

Take a look at the left column of my website:


As you can see, the first third of the background is a background image, and then after this, it's just one colour (just grey). How can I do this with CSS, so I can have the top part of the background as an image, then when this image finishes, it goes to a plain colour? Bear in mind I want text which would flow from one background into another (as shown in the image above), and this is where I am struggling to know how I could do this?

Thanks, James

08-12-2010, 03:57 PM
Use css to set the background color to the gray you need and add the background image as well. When the box elements expands to larger then the image then it will use the background color you set.

Something like

background: #00ff00 url('background_image.gif') no-repeat fixed top left;

08-12-2010, 04:04 PM
edit .
background-image: url('background_image.gif');
background-repeat: repeat-y;css

08-12-2010, 05:12 PM
thank you both - I will try and and see what results I get ;)