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?
would link from root to folder "style_sheets" and then to file "main_style.css".
<link href="style_sheets/main_style.css" rel="stylesheet" type="text/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 "/"
Eye for Video
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)