Views Tables and Zebra Striping

By peterm, 8 December, 2010

Tags

I was driven a bit crazy by trying to get the standard glossary view to show up as striped. In the views preview it worked, when looking at the page it was a solid grey. 

Two things need to be examined.

First, check the view configuration. Set the style of table to none. Set the sort order for the view. 

Second, override the modules > system > style.css entries into a local.css file. I pulled this info out to override:

th.active img { display: inline; } tr.even, tr.odd { background-color: #eee; border-bottom: 1px solid #ccc; padding: 0.1em 0.6em; } tr.drag { background-color: #fffff0; } tr.drag-previous { background-color: #ffd; } td.active { background-color: #ddd; } td.checkbox, th.checkbox { text-align: center; } tbody { border-top: 1px solid #ccc; } tbody th { border-bottom: 1px solid #ccc; } thead th { text-align: left; /* LTR */ padding-right: 1em; /* LTR */ border-bottom: 3px solid #ccc; }