Selecting an element that doesn't have a child with a certain class - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:element parent child

Description

Selecting an element that doesn't have a child with a certain 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">
h1:not([class=Handle]) {<!-- w  w  w  .  j av a2 s . c  o m-->
   cursor:move;
}
</style> 
 </head> 
 <body> 
  <div> 
   <div> 
    <h1>Lorem ips</h1> 
   </div> 
   <div> 
    <h1 class="Handle">Lorem ips</h1> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials