August 24th, 2003, 08:33 PM
CSS: Background Image Path
I have a probelm linking to a background image using CSS. I am using this line:
"path" is the direct path underneath localhost. The picture shows up when I am trying the view it with my browser (http://localhost/path/back01.gif) . But in my PHP File it doesn't. I am using the direct path because the paths of my PHP File are a bit confusing - so I thought it would be easier, but it doesn't work. I am having a php file, that includes other php files with functions, and these functions include the stylesheet:
index.php should show the background image, the stylesheet links to the image and the stylesheet is printed into the index.php by the functions, I mean it is linked.
Do I have to specify the path for the background-image option so that I recognizes it that it is a direct path?
Thanks for taking your time
August 25th, 2003, 07:06 AM
August 25th, 2003, 07:13 AM
August 25th, 2003, 11:23 AM
Hmm I am pretty sure that my Server can find the CSS file, as nothing would be formatted on the whole page without it.
The direct and full path would be the "safer" way. By that I mean that it should work 100% right? I was using the way that you ary saying, relative to the location of the css stylesheet not the php file, but still it didn't work. But as I said the direct path shows up the picture, how can I put the full path into the url? as url("http://localhost/path/images/back01.gif");