Das Style-Sheet für die Tabelle:
table {
border-collapse: separate;
border-spacing: 2px 2px;
margin: 1em;
background-color: #fff;
width: 800px;
margin-right: auto;
margin-left: 0;
}
td {
padding: 2px 15px 2px 5px;
}
th {
padding: 3px 15px 3px 5px;
}
tfoot th {
text-align: right;
}
table th.tag {
text-align: left;
}
table thead tr.caption th {
border: 2px solid #ddf7ee;
background-color: #fff;
font-size: 1.2em;
}
table tfoot tr.caption {
display: none;
}
table thead tr,
table tfoot tr {
background-color: #ddf7ee;
}
table tr.di,
table tr.do {
background-color: #f7f7f7;
}
table tr.mo,
table tr.mi,
table tr.fr {
background-color: #eee;
}
table tr.sa {
background-color: #fff7f7;
}
table tr.so {
background-color: #fee;
}
table colgroup.rohdaten {
background-color: #fec;
}
table colgroup.auswertung2 {
background-color: #ddf;
}
Das HTML der Tabelle:
<table cellspacing="2">
<colgroup>
<col class="tag" />
</colgroup>
<colgroup class="rohdaten">
<col class="datum" />
<col class="kommt" />
<col class="geht" />
</colgroup>
<colgroup class="auswertung1">
<col class="anwsd" />
<col class="arbzt" />
</colgroup>
<colgroup class="auswertung2">
<col class="ubstd" />
<col class="fehlt" />
</colgroup>
<colgroup>
<col class="bemkg" />
</colgroup>
<thead>
<tr class="caption">
<th colspan="9">Arbeitszeitauswertung Woche 02/2005</th>
</tr>
<tr class="first-child">
<th class="first-child tag">Tag</th>
<th class="datum">Datum</th>
<th class="arbzt">Arbeitszeit</th>
<th class="ubstd">Überstunden</th>
<th class="fehlt">Fehlzeiten</th>
<th class="last-child bemkg">Bemerkungen</th>
</tr>
</thead>
<tfoot>
<tr class="last-child">
<th class="first-child tag">Summe:</th>
<th class="datum"></th>
<th class="arbzt"></th>
<th class="ubstd">3:48</th>
<th class="fehlt">3:43</th>
<th class="last-child bemkg"></th>
</tr>
<tr class="caption">
<th colspan="9">Arbeitszeitauswertung Woche 02/2005</th>
</tr>
</tfoot>
<tbody>
<tr class="first-child woche mo">
<th class="first-child tag">Montag</th>
<td class="datum">10. Jan</td>
<td class="arbzt"></td>
<td class="ubstd"></td>
<td class="fehlt"></td>
<td class="last-child bemkg">Krankheit</td>
</tr>
<tr class="woche di">
<th class="first-child tag">Dienstag</th>
<td class="datum">11. Jan</td>
<td class="arbzt">5:48</td>
<td class="ubstd"></td>
<td class="fehlt">1:42</td>
<td class="last-child bemkg"></td>
</tr>
<tr class="woche mi">
<th class="first-child tag">Mittwoch</th>
<td class="datum">12. Jan</td>
<td class="arbzt">9:56</td>
<td class="ubstd">2:26</td>
<td class="fehlt"></td>
<td class="last-child bemkg"></td>
</tr>
<tr class="woche do">
<th class="first-child tag">Donnerstag</th>
<td class="datum">13. Jan</td>
<td class="arbzt">8:52</td>
<td class="ubstd">1:22</td>
<td class="fehlt"></td>
<td class="last-child bemkg"></td>
</tr>
<tr class="woche fr">
<th class="first-child tag">Freitag</th>
<td class="datum">14. Jan</td>
<td class="arbzt">5:29</td>
<td class="ubstd"></td>
<td class="fehlt">2:01</td>
<td class="last-child bemkg"></td>
</tr>
<tr class="we sa">
<th class="first-child tag">Samstag</th>
<td class="datum">15. Jan</td>
<td class="arbzt"></td>
<td class="ubstd"></td>
<td class="fehlt"></td>
<td class="last-child bemkg"></td>
</tr>
<tr class="last-child we so">
<th class="first-child tag">Sonntag</th>
<td class="datum">16. Jan</td>
<td class="arbzt"></td>
<td class="ubstd"></td>
<td class="fehlt"></td>
<td class="last-child bemkg"></td>
</tr>
</tbody>
</table>