...

View Full Version : Mulltiple Background Images



RisTar
05-20-2008, 12:37 AM
Hi , i have a question about applying background using CSS.
Is there a way to put multiple background images on one div tag ? one for the top , one for the bottom and one for the rest using css only ?
Each time that i want to do it i use tables and i'm not so sure that this is
the proper way ...

binaryWeapon
05-20-2008, 12:53 AM
I believe not.

http://www.w3schools.com/css/css_background.asp

VIPStephan
05-20-2008, 02:03 AM
It’s supposed to be possible in CSS 3 but until that’s out and all browsers support it a lot of water will have flowed under the bridge. So the short answer is: no.

Arbitrator
05-20-2008, 02:14 AM
Is there a way to put multiple background images on one div tag ? one for the top , one for the bottom and one for the rest using css only ?Yes, there is a way to do this per the CSS3 Backgrounds and Borders module drafts [1] [2]. However, insofar as Iím aware, that part of the draft is only supported in Safari 3 [3].

Iíve created a demo that uses the feature [4] [5], but youíll need to be using a browser that supports it, such as the mentioned Safari 3.


Each time that i want to do it i use tables and i'm not so sure that this is
the proper way ...Using table elements exclusively for layout purposes is definitely not the proper way to be doing things. Use elements with no semantics attached (i.e., div or span elements) instead.

References

http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-background
http://dev.w3.org/csswg/css3-background/#the-background
http://www.apple.com/safari/download/
http://www.jsgp.us/demos/cf140140-multiple-background-images.html
http://www.jsgp.us/demos/cf140140-multiple-background-images.xhtml



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum