CSS nth-child for greater than and less than - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:nth-child

Description

CSS nth-child for greater than and less than

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">
.container+.container~.container {<!--   w  ww .j a  v a  2  s .  co m-->
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div class="container">
    Lorem i 
  </div> 
  <div class="container">
    Lorem i 
  </div> 
  <div class="container">
    Lorem i 
  </div> 
  <div class="container">
    Lorem i 
  </div> 
  <div class="container">
    Lorem i 
  </div>  
 </body>
</html>

Related Tutorials