...

View Full Version : can you set css background twice



juxmedia
10-11-2007, 10:19 AM
is it possibl to set a css background then set a transparent backgournd over the top with the odd image in it but making this all under the rest of my site not sure if iv made this clear ror not .

rmedek
10-11-2007, 10:48 AM
You can only have one background image per element using CSS, but you can nest elements to fake it:


<body>
<div id="wrapper">
<!-- content -->
</div>
</body>

body {
background: url(image1.jpg) left top no-repeat
}

#wrapper {
background: url(image2.jpg) left bottom repeat-x;
}

vtjustinb
10-11-2007, 02:12 PM
As of the CSS3 spec you can, but Safari is the only browser with any support for that at current, and it'll probably be a long time before we see the IEs catch up, so the above method is what you want to use. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum