My Opera is closing 3rd of March

Raphael's Pflock

miscellaneous Opera, Debian, Media and German posts

Alternating Row Color in HTML Tables

, , , ,

HTML tables are nice for presenting data. However, with wide tables, you might want to alternate the line colors (e.g. blue and white) for improving readability. You may code this by hand, maybe assigning different CSS classes to the Tags. Some wiki enginges do this automatically for you (e.g. TWiki). Recently I've found some nice howtos for automating table striping: Lorenzo E. Danielsson shows how table striping with PHP works.
David F. Miller explains how to use JavaScript and CSS for alternating row colors in an HTML table.
And David Storey demonstrates how CSS3 supports alternating row colors.

Image stolen from David F. Miller's blog post

Kontosperre auf VerdachtLassen Sie mich durch...

Write a comment

New comments have been disabled for this post.