[thelist] strategies for global css in a local site - abs/rel paths

aardvark roselli at earthlink.net
Tue Mar 5 21:04:01 CST 2002


> From: Sam <sam at sam-i-am.com>
>
> > that's actually root-relative... absolute would be
> > http://foo.com/images/bg.gif...
>
> some would say that is full absolute. [partial-] absolute describes
> paths that are absolute from the given root. Granted, it helps to
> distinguish between document and root relative when talking about
> relative paths... Pedantry aside (please lets not get into url
> swapping on this one :)

'course not, but i'll still call that root-relative -- all paths are based on the root
of the volume/site...

> > also, if you don't want to call a CSS file with an abosulte path to
> > an image (or a relative path that would be different on every page),
> > consider putting that chunk of CSS in the head of every document...
>
> ok that's the third possibility I was overlooking - don't use a global
> css at all, and make all paths in every document - html or css -
> document relative. Cacheing isn't an issue locally anyhow so there's
> no loss there, though the online, server-based experience might suffer
> a little.

right... caching shouldn't matter since you'll be calling the same file over and
over, just from a different path -- it'll be cached...

i still say use a global CSS file --after all, what's the point of using CSS if you
have to update every file every time... just make sure anything that calls
outside resources is embedded in CSS in the head of the page instead of the
linked CSS...

[...]
> and thinking about it there's a 4th posibility. As support for nn4
> will likely be a useable but degraded design, I could possibly ensure
> no background-images are used in the main css, and @import a 2nd css
> which just adds a layer of refinement for browsers that can handle it.

can't say i see how that will help...

you'll still have to wrestle with the path issues (on both the imported CSS and
the images), right?




More information about the thelist mailing list