I have the following html :
<div class="dashboard-widget big-counter">
<ul class="list-inline">
<li>
<div class="title">Pageview</div>
</li>
<li>
<div class="title">Order</div>
</li>
<li>
<div class="title">Sales</div>
</li>
<li>
<div class="title">Earning</div>
</li>
</ul>
</div> <!-- .big-counter -->
I am trying to hide the last 3 <li>
elements out of the 4, so I only need to have the "Pageview" first <li>
element visible.
I've read in another question that the most browser compatible way of doing this would be li + li
trick, so to hide the first element, the CSS would be as follows :
.dashboard-widget.big-counter ul.list-inline li {
display: none !Important;
}
.dashboard-widget.big-counter ul.list-inline li + li {
display: list-item !Important;
}
But that works great for the first element.
How can I skip the first element and hide the last 3 with this method ?
Or any other browser compatible method ?
My fiddle is here : http://jsfiddle.net/03w0kk4t/