Results 1 to 2 of 2

Thread: Relative file paths

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Relative file paths

    Hi,

    I have a document in the root directory of my web page. I have a layout defined that contains a relative url to this document. However, if I apply the style sheet to a document in sub folders, the relative url does not point to the document anymore. How, using relative url's, can I reference documents in the root directory regardless of the depth of the current document?

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    use ../ to go back a directory.

    Example:
    say your root folder has style.css but the file I am viewing is root/files/home/index.html

    You would have to link to the style css (relatively) like so:
    <link href="../../style.css" ....... />
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width