View Full Version : 2 background images

08-25-2005, 04:44 PM
i would like 2 or more images. one across the top and one down the side.
ive got as far as

background-image: url('picts/background-main.gif');

and this places the one image correctly down the side. but how do i use 2 images? i cant do background-image: url('the other pic'); can i ?


08-25-2005, 04:56 PM
Nope. You would have to make another div inside the area and position it absolutly to 0,0

Grant Palin
08-25-2005, 05:52 PM
Supposedly the CSS3 spec allows for multiple background images in a single element. Could be very useful (e.g. sliding doors with one element instead of two), but it's probably still a ways away from being usable.

08-25-2005, 06:34 PM
see uv lost me now...im a proper noob, where do the divs go? do i use them in the css script or html?

lol :confused:

08-25-2005, 07:11 PM
You can also give the html a background. ;)

html { background: url(blah.jpg) top; height: 100% }
body { background: url(blah2.jpg) left; height: 100% }

08-25-2005, 07:47 PM
Nest your html elements. Eg give an extra <em><i> or<b> and style the bg on that. (you do need to make it a block element though)