Select HTML element with single class and do not select others with multiple classes - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:not

Description

Select HTML element with single class and do not select others with multiple classes

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.table-view>.table-cell:not(.split) {
   background-color:Chartreuse;
}
</style> <!--   w w w .j  av  a2 s.  co  m-->
 </head> 
 <body> 
  <div class="table-view"> 
   <div class="table-cell">
     Lor 
   </div> 
   <div class="table-cell split"> 
    <div class="table-cell">
      Lor 
    </div> 
    <div class="table-cell">
      Lor 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials