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@[192.168.1.31]>
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.
>
><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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:31 GMT