Forum
Blog post for_every
Hi all
i need a little help
the below code works fine
but the first item gets the class large-4
and my 6th item also gets large-4 when i need it to be large-6
<div class="
<perch:if exists="perch_item_first"> large-6 </perch:if>
<perch:every nth-child="2n"> large-6 </perch:every>
<perch:every nth-child="3n"> large-4 </perch:every>
<perch:every nth-child="4n"> large-4 </perch:every>
<perch:every nth-child="4n+1"> large-4 </perch:every> columns <perch:if exists="perch_item_last"> end </perch:if>">
It's
4n+1
that applieslarge-4
to the first item.3n
applieslarge-4
to the 6th item.https://nth-test.com
Ooo thats a good website thanks