Click to See Complete Forum and Search --> : 2 background images


cs3mw
01-17-2007, 09:28 AM
Hi, ive been asked to re-code a website for a friend and have come stuck with a background image. At present the background image is placed on every page of the website and is coded on each html page. Now what I want to do is place this in the css file i am creating which is done by the following code:

body {background: white url(building.jpg) no-repeat url(tile.jpg) no-repeat}

However, the background image is made up of two images and this is where I have a problem. Has anyone had any experience of this type of dilema. I know I could create a second layer but this would mean calling the div in each html page and if the image ever changes then this would be time consuming. Ive read something about css3 having multiple background images but not all browsers support this. Any ideas?

The link is www.off-plan.biz (http://www.off-plan.biz) and the image is placed at the top of the screen.

KDLA
01-17-2007, 09:57 AM
It is CSS3, http://www.w3.org/TR/css3-background/#layering, but I think Safari is the only browser which fully supports it.

KDLA

Fang
01-17-2007, 10:09 AM
Any image can be coded in the css file.
You could use the h1 element, with height and width declared, to hold building.jpg and the body for tile.jpg or this: html {background: url(tile.jpg) repeat-x;}
body {
background: url(building.jpg) no-repeat;
margin:0;
padding:140px; /* position of menu */
}

cs3mw
01-17-2007, 10:21 AM
its fine looking at it i think im just best storing the images in individual layers and calling them from each page. That way if there is changes to be made i can just update the layer properties. Cheers for your help