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

Sam sam at sam-i-am.com
Tue Mar 5 15:21:52 CST 2002

> 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 :)

> 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

I have to assume I have no knowledge or control over where in this stuff
might end up (this is a developer manual that will have a permanent home
on a server but past experience shows people like to download bits to
keep it handy, expect deliverables as zips, break off fragments for
subcontractors etc.. I'd love to say here's the url, but business
realities dictate otherwise)

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.


More information about the thelist mailing list