Functino

My daily struggle with webdevelopment

Category: PHP

cakePHP cycle-helper: alternating row colors with cake

It’s been a long time since my last posting. Today I’m going to show you my cycle-helper for cakePHP. If you haven’t read my other posts on alternating row colors, do so now: Alternate Table Rows in CakePHP (and ZF, Rails, Smarty)
The cycle-helper is easy to use and install and if your familiar with [...]

Zebra Tables: How to alternate table row colors

What is a “Zebra Table”? It’s a striped table with alternating row colors like this:
You can achieve this with very different approaches:
CSS only
With CSS 3 you can achieve such a table with the pseudo class nth-child. The rules are extremly simple and no additonal markup is required. Just add these lines to your CSS:

tr:nth-child(even) {background-color: [...]