css - Select HTML element with single class but do not select others with multiple classes? -


suppose have component .table-view has .table-cell child, , want keep classes clean, how select .table-cell has no other classes , direct descendant of table-view?

open kind of advanced selector implemented in relatively new webkit.

<div class="table-view">     <div class="table-cell">        <!-- how select html element without selecting others? -->     </div>     <div class="table-cell split">         <div class="table-cell">          </div>         <div class="table-cell">          </div>     </div> </div> 

you can use element - attribute selector (fiddle)

.table-view > div[class=table-cell] {   /* styles goes here */ } 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -