jcadima
5/11/2015 - 3:01 PM

Hide Specific ul li elements

Hide Specific ul li elements

HTML:

<ul class="links">
<li>some link1</li>
<li>some link2</li>
<li>some link3</li>
<li>some link4</li>
</ul>


/* this will hide the second , fourth and fifth li element  */
ul.links li:nth-child(2), ul.links li:nth-child(4), ul.links li:nth-child(5)  {
  display: none;
}