W3C home > Mailing lists > Public > www-amaya@w3.org > October to December 2008

Re: Simple Questions for Newbie (Background Page Image)

From: Helder Magalh„es <helder.magalhaes@gmail.com>
Date: Fri, 3 Oct 2008 09:20:34 +0100
Message-ID: <2a1ddf8a0810030120j6e73ce10q7274704f042de496@mail.gmail.com>
To: RickinRSM <RickinRSM@cox.net>
Cc: www-amaya@w3.org

Aside from Dominique Meeýs's suggestion, which are most relevant and
IMO you should take into consideration, here's a small, yet general
Web development suggestion. ;-)

>  background-image: url(D:/RealEstate/XSite/TestSplash.jpg);

Always avoid full paths - use relative paths instead. If your HTML
file is in the same directory as "TestSplash.jpg", simply write:

background-image: url(TestSplash.jpg);

You can crawl through the directories to reach your file (using ".."
and/or directory names). If you really want to use full paths, at
least don't make use of file specific URL information such as "D:" -
use "/RealEstate/XSite/TestSplash.jpg" which, when you upload it to a
Web server, will turn into

This is *not* limited to including images and such - it can and
*should* be applied to navigation (jumping between HTML files) and
other included resources (referenced CSS files, images within HTML
context, etc.).

Hope this helps,

 Helder Magalh„es
Received on Friday, 3 October 2008 08:21:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:40 UTC