Forum Moderators: not2easy

Message Too Old, No Replies

can't embed a background-image :-(

         

Makaveli2007

12:13 am on Dec 15, 2007 (gmt 0)

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



I'm trying to use the French flag as the background image of my website.

I just wanted to try it and downloaded a gif-picture of it. Then I used this code in my external style sheet (my folder file names are in German so I'll translate them):

body {
background-image: url(CSS/backgroundimages/backgroundimage.gif);
}

The background-image...backgroundimage.gif was all in one line (as opposed to here).

However no background image is showing up! What could be the mistake here?

encyclo

12:20 am on Dec 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The path is probably incorrect - check your logs to see if there's a 404 error for the image. You should use a path relative to your document root to avoid problems:
[b]/[/b]CSS/backgroundimages/backgroundimage.gif

Makaveli2007

12:30 am on Dec 15, 2007 (gmt 0)

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



unfortunately the path is correct, but it's still not working :-(. I've also tried downloading and embedding another pic, which didn't work either.

P.S.: I tried both, but should I usually use a relative path such as

/CSS/backgroundimages/...

or

CSS/backgroundimages/...?

Or doesn't it matter, at all?