Re: pseudoclass based on document content

At 12:23 -0400 7/17/04, Justin Watt wrote:

>However the following worked fine in both browsers, so I'm not sure what
>your "except for IE" comment was refering to.
>
><HTML>
><HEAD>
><STYLE>
>.negative {color:red;}
>.financial {font-family:monospace;}
></STYLE>
></HEAD>
>
><BODY>
><SPAN CLASS="financial negative">-190</SPAN>
></BODY>
></HTML>

    IE/Win has no problems with what you've done, but would stumble on 
attempts to combine the classes in a single selector.  If your wrote:

    .negative.financial {background: yellow;}

...then it would apply a yellow background to ALL elements with a 
class attribute containing the word 'financial', instead of only 
those that have both 'negative' and 'financial'.

-- 
Eric A. Meyer  (eric@meyerweb.com)    http://www.meyerweb.com/eric/
Principal, Complex Spiral Consulting  http://www.complexspiral.com/
"CSS: The Definitive Guide," "CSS2.0 Programmer's Reference,"
"Eric Meyer on CSS," and more   http://www.meyerweb.com/eric/books/

Received on Saturday, 17 July 2004 12:33:10 UTC