Can an entire div be hidden with only the first 2 entities visible?
<div class="inline-edit-col">
<span class="title inline-edit-categories-label">Brands</span>
<ul class="cat-checklist product_brand-checklist">
<li id="product_brand-3039"><label class="selectit">acer</label></li>
<li id="product_brand-3040"><label class="selectit">asus</label></li>
</ul>
<span class="title inline-edit-categories-label">Product Categories</span>
<ul class="cat-checklist product_cat-checklist">
<li id="product_cat-3039"><label class="selectit">mobile</label></li>
<li id="product_cat-3040"><label class="selectit">car</label></li>
</ul>
</div>
This is the HTML structure, but I want to only display the first two and hide the rest. Is there a way to achieve this using CSS or JavaScript?
I attempted to use CSS to hide the third and subsequent elements:
.product_cat-checklist{
display:none;
}
However, this hides everything one by one which is not ideal. Any suggestions on how to accomplish this more effectively?