I’d like to add a page background image through CSS rather than using the page properties. I’m not sure where to put it in the code? I want the outer regions of the page to have the image but not the content area.

Adding the background-image to the 'body' section seems to not be correct. Here is the beginning of the code:

It will show your background image, then the wrapper div sets a background colour for your content area, in effect covering up the background image just in the content area.

Mike...

domedia

04-06-2007, 02:02 PM

Adding the background-image to the 'body' section seems to not be correct. It is right, but you have nothing in your code defining css background image, not sure how you expect to have the background image appear when you haven't even inserted the code for it.

dsnyder

04-06-2007, 03:05 PM

you have nothing in your code defining css background image, not sure how you expect to have the background image appear when you haven't even inserted the code for it.

What is wrong with this? Maybe I missing something that is overriding my background-image request? Should I post more of the code?
derek

domedia

04-06-2007, 03:29 PM

background-image:url(../Images/BkGrd/img_39.gif);
There is nothing wrong with that line, your CSS is valid and correct code.
All you have to make sure the path is correct and that there is an image with that name at that location.
Remember if this is in a separate CSS file, the image location is relative to the CSS document.

dsnyder

04-06-2007, 03:39 PM

Thanks,
the path and image should be correct. When I link to the image in the page properties all works gloriously.

Remember if this is in a separate CSS file, the image location is relative to the CSS document.

What do you mean? Maybe this is the issue.

domedia

04-06-2007, 03:50 PM

The path to your image in your CSS rule, has to be relative to the CSS document the rule is in.
I can't explain it any other way as it says exactly what it is..

If your CSS file is domain.com/assets/styles.css
If your image is domain.com/images/image.jpg

then the path should be from the CSS file to the image:
../images/image.jpg.