Select All Elements Except elements with a specific class - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:class

Description

Select All Elements Except elements with a specific class

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">
div {<!-- w w w.  j a  va 2 s . c o  m-->
   padding:11px;
   border-width:3px;
   border-style:solid;
}

* {
   border-color:Chartreuse;
}

.c,
.c * {
   border-color:yellow;
}
</style> 
 </head> 
 <body> 
  <div class="a">
    Lor 
   <div class="b">
     Lor 
   </div> 
   <div class="c">
     Lor 
    <div class="d">
      Lor 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials