|
Posted by Jukka K. Korpela on 12/19/06 10:57
Scripsit Andy Dingley:
> CSS is (generally) a site-wide shared feature, so store it somewhere
> that's accessible with an equal path from a page anywhere on the site.
> "/", "/styles/" or "/css/" all work fine.
That's fine site-wide stylesheets. Others might be put into topical
directories. The use of stuff like "/styles/" or "/css/" is common but
largely overkill. If you have a single site-wide stylesheet, you might just
as well put it into the main directory of your web pages. But if you have
several alternative stylesheets, perhaps divided into separate files for
technical reasons, and hopefully with documents that explain the
stylesheets, a subdirectory is a useful way to organize things.
> Just make sure you begin the
> references to it with a "/" so that they're absolute.
A URL that begins with "/" is by definition relative, not absolute, by the
Internet-standard on URL (URI) syntax. What matters is that it is relative
to the server root, not to the base URL of the referring document.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|