Prev | Current Page 106 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

Here??™s an example:
div.foo.bar {
?‹® declarations
}
div.foo.bar[title^="Help"] {
?‹® declarations
}
The first example selector above matches div elements whose class attribute value
contains both the words "foo" and "bar". The second example selector matches
div elements whose class attribute values contains both the words "foo" and
"bar", and whose title attribute values begin with the string "Help".
Compatibility
Opera Safari Firefox Internet Explorer
9.2 3.0 2.0 1.3 2.0 1.5 1.0 7.0 6.0 5.5
Full Full Full Full Full Full Full Full Buggy Buggy
In Internet Explorer 6, the class selector doesn??™t work if the class name starts with
a hyphen or an underscore.
In Internet Explorer up to and including version 6, only the last class selector is
honored; all others in a chain of class selectors are ignored. For example, a selector
like .x.y.z will match all elements with a class attribute that contains the value
"z", but will not restrict the match to elements that also have the class attribute
values "x" and "y", which it should.


Pages:
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118