...

View Full Version : can you have two different repeat-x background images in css?



code beginner
05-11-2010, 09:32 PM
hello,

a common practice in css is to have a background image repeat horizontally using repeat-x.

i was wondering if you can set up two different background images. so the first one will repeat horizontally across the entire screen. then the second one will repeat horizontally across the entire screen under it. kind of like this:

111111111111111111111111111
222222222222222222222222222

i'm looking at how to do this in a single tag environment, rather than setting up two separate divs.

met
05-11-2010, 10:02 PM
one image

coloured say half red, half blue.



body { background:red url(image.jpg) repeat-x top; }


top part of the "body" will be colour one, rest of the page will be colour two.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum