I have three div with the same class name, I want to hide the first and last div.
My code:
<div class="clsname">div1</div>
<div class="clsname">div2</div>
<div class="clsname">div3</div>
Now i want to hide div1 and div3. In fact i want this output in browser:
div2
How can i do that ?
For clarification, I want something like this: (this would hide only div3 )
div.clsname + div.clsname + div.clsname {display:none;}