Re: Precedence within a stylesheet

At 12:10 -0500 09/18/97, Andi Hindle wrote:
>I'm trying to figure out what takes precedence over what in a stylesheet.
>Thus, given:
>
>body { color : #FFFFFF;}
>h1 {color : #FF0000;}
>
>will my <h1> turn out red or white?

   If I read Section 3.2 of the specification correctly, your H1s will turn
out red, assuming that both statements have the same origin.  I'm basing
this on rule 4 (the specificity rule).  Since a declaration for H1 is more
specific than a declaration for BODY, it should win out.

--
Eric A. Meyer  -  eam3@po.cwru.edu  -  http://www.cwru.edu/home/eam3.html
 Hypermedia Systems Manager
 Digital Media Services                http://www.cwru.edu/dms/dms.html
 Case Western Reserve University       http://www.cwru.edu/

Received on Thursday, 18 September 1997 13:57:11 UTC