For zebra-striped tables, use the nth-child() selector and add a background-color to all even (or odd) table rows:
| First Name | Last Name | Points |
|---|---|---|
| Peter | Griffin | $100 |
| Lois | Griffin | $150 |
| Joe | Swanson | $300 |
| Cleveland | Brown | $250 |
For zebra-striped tables, use the nth-child() selector and add a background-color to all even (or odd) table rows:
| MON | TUE | WED | THU | FRI | SAT | SUN |
|---|---|---|---|---|---|---|
For zebra-striped tables, use the nth-child() selector and add a background-color to all even (or odd) table rows:
| MON | TUE | WED | THU | FRI | SAT | SUN |
|---|---|---|---|---|---|---|
Add the border-bottom property to the tr elements for horizontal dividers:
| Firstname | Lastname | Savings |
|---|---|---|
| Peter | Griffin | $100 |
| Lois | Griffin | $150 |
| Joe | Swanson | $300 |
| Cleveland | Brown | $250 |
Move the mouse over the table rows to see the effect.
| First Name | Last Name | Points |
|---|---|---|
| Peter | Griffin | $100 |
| Lois | Griffin | $150 |
| Joe | Swanson | $300 |
| Cleveland | Brown | $250 |