Get EasyTable Pro !

Get a Subscription for EasyTable Pro!
(
The current version is emailed to you when your subscription is payed.
Existing Subscribers can download here

Sunday May 20 , 2012
Font Size
   

How can I get alternating row colors?

Row CSS Class

EasyTable for J! and EasyTable Pro attach 'row0' and 'row1' to each alternate row, starting with 'row0' for the first row on a page followed by 'row1' for the next, then 'row0' again and so on.

<tr class="row0">...</tr> - Initial Row with 'row0' class attached.

 <tr class="row1">...</tr>

 <tr class="row0">...</tr>

Example CSS

The CSS examples described here can be seen in the tables on our demo website.

For a lot of templates the CSS is already defined for the CSS classes 'row0' and 'row1', however, a few templates do not have these class definitions. In those cases you will need to add some CSS that defines the classes. The following CSS defines the two classes, making the background of all 'row1' a light grey.

tr.row0 { background-color: #FFFFFF; }

tr.row1 { background-color: #F9F9F9; }

If you want the rows to change color as the cursor moves you can use the pseudo selector 'hover' as shown in the example CSS.

tr.row0:hover { background-color: #FFD; }

tr.row1:hover { background-color: #FFD; }

RSForm! Pro by RSJoomla!


RSForm!Pro is a powerful Joomla! form creator, helping you to create custom forms in minutes. The new product makes form management much easier and gives you the time to handle your clients better.

For only €19.00 how can you go wrong?
 ( We've used it for years... Shouldn't you? )

Member Login