06 Oct, 2009

Table design #3: Horizontaal zebra

Categoriën: crossbrowser |table |template |valid |Xhtml Strict

Tabellen zijn gedacht voor het weergeven van data (dat is een globaal begrip) niet om layout van een website te maken. Dit is deel 3 van verschillende mogelijkheden van tabellen van style te voorzien.

HTML

<table summary="Employee Pay Sheet" id="hor-zebra">
<thead>
<tr>
<th scope="col">Employee</th>
<th scope="col">Salary</th>
<th scope="col">Bonus</th>
<th scope="col">Supervisor</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Stephen C. Cox</td>
<td>$300</td>
<td>$50</td>
<td>Bob</td>
</tr>
<tr>
<td>Josephin Tan</td>
<td>$150</td>
<td>-</td>
<td>Annie</td>
</tr>
<tr class="odd">
<td>Joyce Ming</td>
<td>$200</td>
<td>$35</td>
<td>Andy</td>
</tr>
<tr>
<td>James A. Pentel</td>
<td>$175</td>
<td>$25</td>
<td>Annie</td>
</tr>
</tbody>
</table>

CSS

#hor-zebra {
border-collapse:collapse;
font-family:"Lucida Sans Unicode","Lucida Grande",Sans-Serif;
font-size:12px;
margin:20px;
text-align:left;
width:480px;
}
#hor-zebra th {
color:#039;
font-size:14px;
font-weight:normal;
padding:10px 8px;
}
#hor-zebra .odd {
background:#E8EDFF none repeat scroll 0 0;
}
#hor-zebra td {
color:#669;
padding:8px;
}
#hor-zebra .odd {
background:#E8EDFF none repeat scroll 0 0;
}

Gerelateerde Snippets

Geen reacties op "Table design #3: Horizontaal zebra"

Reactie formulier


Advertenties

Volgende nieuwe Snippet:

  • Momenteel niks gepland.