View Full Version : two background images
Blackmes
08-11-2005, 04:17 AM
I don't know if this is possible, but i want to use two images as a background-image. I need two borders at the top and the bottom to match the tables within, and i can't just use one image with the apporite height settings, becasue IE and FF have different BR sizes ect.
so is there any way i can get one image to be the background to repeat at the top, and the other to do the same at the bottom?
thanks. :thumbsup:
_Aerospace_Eng_
08-11-2005, 04:18 AM
You would need to set a background to the body and then use a containing div and set the background of that.
mark87
08-11-2005, 09:59 AM
You could try setting one for the html and body (I'm sure I've seen this work, but don't quote me on that!).
html { background: url(1.jpg) top no-repeat }
body { background: url(2.jpg) bottom no-repeat }
mrruben5
08-11-2005, 10:29 AM
The css 3 specification defines that it is possible to load more then 1 image. But since current browsers don't support this, you'll have to use nested div's. Or you could go and use the reommended tbody element and put a background on that too I guess.
by the way, for the br, you should set that with lineheight. eg
body {line-height: 1.5em;}
Blackmes
08-26-2005, 03:07 PM
thanks for the help, but i can't seem to get it to work.
can you give me an example of what you mean?
[i prefer using div's]
mrruben5
08-26-2005, 11:07 PM
.theimage1 { background: url(image1.jpg) no-repeat top left }
.theimage2 { background: url(image2.jpg) no-repeat bottom right }<div class="theimage1"><div class="theimage2">Nesting.</div></div>It isn't very elegant, I know.
gsnedders
08-26-2005, 11:24 PM
The css 3 specification defines that it is possible to load more then 1 image. But since current browsers don't support this, you'll have to use nested div's. Or you could go and use the reommended tbody element and put a background on that too I guess.
Safari 1.3 and 2.0 support multiple backgrounds.
Blackmes
09-04-2005, 05:16 PM
thanks!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.