Use css nth-child infinitely - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:nth-child

Description

Use css nth-child infinitely

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">
.category-pro {<!-- w ww . jav  a2  s  .  c o m-->
   position:relative !important;
   float:left !important;
   width:208px !important;
   margin-right:25px;
}

.category-pro:nth-child(3n+0) {
   margin-right:0px !important;
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum 
  </div> 
  <div class="category-pro">
    Lorem ipsum d 
  </div> 
  <div class="category-pro">
    Lorem ipsum d 
  </div>  
 </body>
</html>

Related Tutorials