You are here: Re: css stored where? « HTML « IT news, forums, messages
Re: css stored where?

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация