dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Relative Path

  1. #1
    Join Date
    Apr 2005
    Location
    Behind my DiGiCo SD7 Console
    Posts
    900

    Relative Path

    Hi

    How can I make a relative path from my root folder to a subdomain?

    Say that I link my css with this path (css/style.css)

    How can I link the same stylesheet location relative like I did above?

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Code:
    <link href="style_sheets/main_style.css" rel="stylesheet" type="text/css" />
    would link from root to folder "style_sheets" and then to file "main_style.css".
    This would be described as drilling down (from a postion at the root into folder called "style_sheets").
    From a position inside a sub folder called "new_projects" which is inside a folder called "developements", the path would require drilling up first, to the root, then drilling down into the "style sheets" folder. Drilling up is denoted by "../" So the path for the second example would be:
    <link href="../../style_sheets/main_style.css" rel="stylesheet" type="text/css" />
    Drill down "/"
    Drill up"../"
    Eye for Video
    www.cidigitalmedia.com

  3. #3
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Define "subdomain". If it's really a subdomain then you can't establish a relative link to it. If they are on the same physical host and the OS is Unix-like then you could use soft links (man ln) to tie them together through the file system rather than the protocol.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles