I have a gallery that will repeat, every five photos, it jumps down.
Only, when the element is the fifth, ie = 5, I want it to apply a margin-right=0
.
My HTML:
<ul class="galeria">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
My CSS:
.galeria li:first-child + li + li + li + li + li {
margin-right: 0!important;
}
Ok, this is working perfectly, but what about element 10, 15, 20?
I would not like to have to put a ,
in my CSS and repeat ownership, has an easier way? Is there a sum for this? that works pro IE8