Broadcast: News items
Easily stripe tables
By: Andrew Collington
Last updated: Friday, 17 January 2014
When using the standard classes you've always had the ability to stripe the rows with the classes 'odd' and 'even'. This has worked well but can prove to be a bit of a pain when you have a really long table or if you need to add a row in the middle of it, where you then find yourself having to change all the subsequent <tr> tags to have the correct odd/even class.
Well, not any more!
We've made it super easy to add striping to your class - just add the class stripe to your table and then any rows within your table body will be coloured correctly. And if you add a new row it'll adjust everything and still keep it coloured in an odd/even way.
For example code on how to create tables properly and use the available classes, check out the tables page in the WCM manual.
Further information: http://www.sussex.ac.uk/webteam/manual/wcm/elements/tables