W3C home > Mailing lists > Public > www-style@w3.org > June 2001

RE: Specificity with id selectors

From: Eric Costello <eric@schwa.com>
Date: Fri, 15 Jun 2001 13:45:24 -0500
To: "Www-Style@W3. Org" <www-style@w3.org>
Message-ID: <NEELIJPJGLONEACJAECIIEPIIGAA.eric@schwa.com>
Thanks Eric

>> In my tests, browsers ignore a rule with the #myID selector if a rule for
>> div#myID also exists anywhere in the document.

>That sounds correct, assuming you were doing simple testing (like setting a
>different color for each to see which one wins).  If you were using
different
>properties and one of the rules got entirely ignored, then you may have
found
>a bug.

No, I don't believe there is a bug. I should not have said the rule was
"ignored", but that any declaration that appeared in the #myID rule was
overridden by a declaration for the same property in the div#myID rule.
Which is as it should be!

Thanks again,
Eric
Received on Friday, 15 June 2001 14:47:56 GMT

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