how do I select a <div class="A"> but not <div class="A B">?

Posted by MedicineMan on Stack Overflow See other posts from Stack Overflow or by MedicineMan
Published on 2010-03-20T00:49:48Z Indexed on 2010/03/20 0:51 UTC
Read the original article Hit count: 290

Filed under:
|
|

I have some divs:

<div id="Target" class = "A"></div>
<div id="NotMyTarget" class="A B"></div>
<div id="NotMyTarget2" class="A C"></div>
<div id="NotMyTarget3" class="A D"></div>
<div id="NotMyTarget3" class="A E"></div>

Is there a css selector that will get me id=Target but not id="NotMyTarget"?

© Stack Overflow or respective owner

Related posts about css

Related posts about html