The CSS for the table component in Woodstock has defined a background-color of white (#FFFFFF). This makes overriding it quite difficult.
1 2 3 4 | table.Tbl_sun 4 td, table.Tbl_sun 4 th { background-color : #FFFFFF ; border-color : #CAD0D2 ; } |
Here is what I added:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | /* * Override the default CSS for Woodstock Table to set the * background-color to transparent so that we can set the * styleClasses tag on the TableRowGroup to use the .odd-row * and .even-row styles to alternate row colors. */ table.Tbl_sun 4 td { background-color : transparent ; } /* * This sets the background-color to a light gray color. */ .odd-row { background-color : #EEEEEE ; } /* * This sets the background-color to white */ .even-row { background-color : #FFFFFF ; } |

The final result was to produce an elegent table with alternating colored rows.

Here is a link to the NetBeans 6.5 project on BitBucket: TableAlternateRowStriping