Hello, if you use a browser with Developer tools, you can probably see in the console or in the network tab an error message, e.g. "Failed to load resource: the server responded with a status of 404 (Not Found) http:// www.example.com/var/www/Webpages2/Images/background3.jpeg ". It can help you debug. Camille 2014-06-18 9:47 GMT+02:00 Maciek Sokolewicz <maciek.sokolewicz@xxxxxxxxx>: > On 18-6-2014 6:41, Ethan Rosenberg, PhD wrote: > >> Dear List - >> >> I really do not know where to send this, but feel that PHP programmers >> are well familiar with HTML/CSS. >> >> See the attached program. The background file exists, >> >> root@meow:/var/www/Webpages2# cd .. >> root@meow:/var/www# ls Webpages2/Images/background3.jpeg >> Webpages2/Images/background3.jpeg >> >> but it does not display. >> >> The script is in /var/www >> The image is in /var/www/Webpages2/Images/ >> >> What is my mistake? >> >> TIA >> >> Ethan >> > > Ethan, paths which you supply in CSS are paths to files called from the > client. This means that they have to be relative to the current URI, not > the system path. So this is fully dependent on how the server-path is > translated to a domain-URI. > > I would guess that "/var/www/Webpages2" is translated to something like > www.example.com/, with "/var/www/Webpages2" thus being the domain root. > If you then supply "url("Webpages2/Images/background3.jpeg")" it will > look for www.example.com/Webpages2/Images/background3.jpeg in > /var/www/Webpages2/Webpages2/Images which is obviously wrong. > > Change it to /Images/background3.jpeg and it will most likely work. > > - Tul > > P.S. Why did you bother to echo all that HTML in the document? Just make > it a fully static HTML file, no need for it to be partially PHP which > simply prints static content. > > --- > This email is free from viruses and malware because avast! Antivirus > protection is active. > http://www.avast.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Camille Hodoul