Page 1 of 1

change color every 2 rows *SOLVED*

Posted: Sat Dec 31, 2016 12:53 pm
by Da_Elf
i know about this
($attendcolor%2 == 0)
but i want it to be
row 1 and 2 white
row 3 and 4 black
row 5 and 6 white etc.
%3 doesnt work nor %4

Re: change color every 2 rows

Posted: Sat Dec 31, 2016 1:00 pm
by Da_Elf
sorry. solved it myself with this

if (($attendcolor - 1) % 4 < 2)

Re: change color every 2 rows *SOLVED*

Posted: Sat Dec 31, 2016 6:27 pm
by requinix
CSS can do it better.