michael_i — 2012-09-11T05:16:42-04:00 — #1
Was wondering if it's bad practise to use an image as a background. I ask this because some people like to use multiple images on a background and it seems that css only allows you to use one image per background, for example if you are using a gradient. e.g (background-image:../gradient.jpg; } background-color:#000;)
What's the best way to use a background when the background requires multiple images?
ralphm — 2012-09-11T05:38:29-04:00 — #2
CSS3 allows for multiple background images on a single element, and this is well supported in the latest browsers. But an alternative it to have divs within divs, each with its own background image.
There are lots of options.
michael_i — 2012-09-11T06:13:37-04:00 — #3
Im a bit confused as to how this would be written in the css. Would the divs go under #body like this?
ralphm — 2012-09-11T06:38:22-04:00 — #4
That would work if you structured your HTML like this:
Or you can try out CSS3 multiple backgrounds.
michael_i — 2012-09-11T07:02:37-04:00 — #5
Thanks for your help.
ralphm — 2012-09-11T07:14:24-04:00 — #6
No problem! Please post back if you have any issues or other questions.