Forum Moderators: not2easy

Message Too Old, No Replies

Background image won't display

It seems to work on the other pages

         

timchuma

12:45 am on Feb 11, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



I put the following in the style sheet for a group of webpages, but I can't seem to get the background to load:
body {
background-color: #CEE7FF;
color: #000000;
background: url('preview/photos_bg.jpg');
}

I tested on Firefox 1.0 and IE6 on Win2000, but it didn't seem to work.

I resorted to putting the following in the body tag:
style="background-color: #CEE7FF; color: #000000; background: url('preview/photos_bg.jpg');"

Thanks.

iamlost

2:22 am on Feb 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It works fine for me - different image and path of course.

Is your image path correct?

Note: By having background: url(<just image path>); follow background-color: #CEE7FF; the background-colour will never show if the image is not displayed - you are defaulting to browser default of #fff. I suggest either chaning background to background-image or dropping background-color and changing background to background: #CEE7FF url(<image path>);.

If the background image displays with inline style but not from an external style sheet while the rest of that external style works properly I am at a loss. Some more info might help.

timchuma

5:11 am on Feb 11, 2005 (gmt 0)

10+ Year Member Top Contributors Of The Month



I managed to get it to work by putting the definition for the body tag in the style sheet up the top of the file (like it was in the working version.)

Thanks.