W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: pseudoclass based on document content

From: Eric A. Meyer <eric@meyerweb.com>
Date: Sat, 17 Jul 2004 12:33:00 -0400
Message-Id: <a0521060abd1f04d01635@[]>
To: www-style@w3.org

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.
>.negative {color:red;}
>.financial {font-family:monospace;}
><SPAN CLASS="financial negative">-190</SPAN>

    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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:14 UTC