use :not selector with :nth-of-type - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:nth-of-type

Description

use :not selector with :nth-of-type

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">
.new-items-table tr:nth-of-type(even) {
   background-color:Chartreuse;
}
</style> <!--from w  w w .  j  a v  a  2s.  c  om-->
 </head> 
 <body> 
  <table class="new-items-table"> 
   <thead> 
    <tr> 
     <th>Lorem </th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>L</td> 
    </tr> 
    <tr> 
     <td>L</td> 
    </tr> 
    <tr> 
     <td>L</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials