CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 140 of 153 of the static tests category | |
Testing | Date | Revision |
Combinations: classes and IDs (ID #176) | 2002-12-06 | 1.0 |
This line should be green.
p { background: red; color: yellow; } p:not(#other).class:not(.fail).test#id#id { background: green; color: white; } div { background: green; color: white; } div:not(#theid).class:not(.fail).test#theid#theid { background: red; color: yellow; } div:not(#other).notclass:not(.fail).test#theid#theid { background: red; color: yellow; } div:not(#other).class:not(.test).test#theid#theid { background: red; color: yellow; } div:not(#other).class:not(.fail).nottest#theid#theid { background: red; color: yellow; } div:not(#other).class:not(.fail).nottest#theid#other { background: red; color: yellow; }
<p id="id" class="class test">This line should be green.</p> <div id="theid" class="class test">This line should be green.</div>