Re: the . class selector

On Friday 2002-05-17 20:18 -0700, Sigurd Lerstad wrote:
> I'm trying to apply a css stylesheet to nitf documents. I have a problem,
> many of the nitf elements have names like <body.head> and <body.content>,
> but the . symbol is reserved for specifying a class in a selector, how do I
> overcome this ?

Use backslash-escapes.  See http://www.w3.org/TR/REC-CSS2/syndata.html#q4

For example:

body\.content {
    display: block;
    background: white;
    color: black;
}

This works in Mozilla.  I'm not sure about other browsers.

-David

-- 
L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >

Received on Friday, 17 May 2002 14:35:31 UTC