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>
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
>properties and one of the rules got entirely ignored, then you may have
>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,
Received on Friday, 15 June 2001 14:47:56 UTC

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