In Internet Explorer versions up to and including 6, if an ID selector that??™s combined
with a class selector is unmatched, all subsequent ID selectors that use the same ID
and are combined with a class selector, are also treated as unmatched.
SPEC
CSS1
BROWSER SUPPORT
Op9.2+ Saf1.3+ FF1+ IE7+
FULL FULL FULL FULL
Example
This example selector matches any element
whose id attribute value is equal to
"breadcrumbs":
#breadcrumbs {
?‹® declarations
}
ID, Please!
By ID attribute, the CSS specification3 doesn??™t necessarily refer to an attribute whose
name is id. An ID attribute is one whose type is declared as ID in the document
type definition (DTD), or similar, for the markup language. In HTML (and XHTML),
this selector matches the id attribute, but in XML it would apply to any attribute
for which a type of ID was specified.
Since attribute types are declared in a DTD or schema??”information that user agents
don??™t normally read??”ID selectors shouldn??™t be used for XML other than XHTML,
unless you know that user agents have built-in knowledge about ID attributes.
Pages:
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119