bcarl314
03-07-2005, 02:53 PM
I just found out something interesting today at work, and I want to know if it's just a funky local system configuration, or if this is indeed true.
I've got a web page (lets say index.html) with a css file attched like so:
<link href="/css/path/to/css/main.css" type="text/css" rel="stylesheet" />
Then, within my css I have several background images...
#someID {
background-image:url("/path/to/image/image.gif");
}
The thing I noticed is in the <link> tag, the root is the document root (i.e http://www.example.org/) but in the css declarations, the root is the directory that contains the css (in this case http://www.example.org/css/path/to/css/). This seems quite odd to me as I would expect "/" to ALWAYS go to the true document root. Anyone else experience this or am I going crazy?
I've got a web page (lets say index.html) with a css file attched like so:
<link href="/css/path/to/css/main.css" type="text/css" rel="stylesheet" />
Then, within my css I have several background images...
#someID {
background-image:url("/path/to/image/image.gif");
}
The thing I noticed is in the <link> tag, the root is the document root (i.e http://www.example.org/) but in the css declarations, the root is the directory that contains the css (in this case http://www.example.org/css/path/to/css/). This seems quite odd to me as I would expect "/" to ALWAYS go to the true document root. Anyone else experience this or am I going crazy?