Re: beef with CSS-specified image URLs

Todd Fahrner <> wrote:
> When specifying an image in CSS (say, a background image, or a list-item
> marker), the URL given in the stylesheet is relative to the HTML document,
> not to the stylesheet, at least as implemented in NS4. The specification is
> unclear.

The specification contains this statement in Section 6.4 URL [1]:

Partial URLs are interpreted relative to the source of the style sheet,
not relative to the document: 
  BODY { background: url(yellow) }


If NS4 is doing otherwise, then it's clearly in violation of the spec.
Do you have a sample document up?

> [Some excellent reasons why it's important to have the partial URL
> interpreted relative to the style sheet's URL deleted]
> I haven't played with @import yet within stand-alone CSS files. I assume
> URLs within these will refer relatively to the CSS document?

I would assume that the spec is applying its URL declaration to both
imported and LINKed style sheets.
E. Stephen Mack <>

Received on Sunday, 27 July 1997 22:05:26 UTC