Forum Moderators: open
Also, you can use thead and tfoot (once each in a table), with multiple tbody tags between them. Maybe someday a browser will be implemented that keeps the head and foot of a table in place and has the body rows scroll... I think some browsers might do that for printing already... that is the intent anyhow, even though it is not widely supported AFAIK.
e.g.
<table>
__<thead>
____<tr>...</tr>
____<tr>...</tr>
__</thead>
__<tbody class="xxx">
____<tr>...</tr>
____<tr>...</tr>
__</tbody>
__<tbody class="yyy">
____<tr>...</tr>
____<tr>...</tr>
__</tbody>
__<tfoot>
____<tr>...</tr>
____<tr>...</tr>
__</tfoot>
Shawn
[add: Oops, I should have refreshed my browser... W3 explains it better]
[edited by: ShawnR at 10:19 am (utc) on May 25, 2003]
That make the question of what it does clearer. However, why would you do it. I'd rather just code header ... content ... footer. If it was involved with paging I'd understand it's use but I just can't see why you would use it. Especially because, the code that I edit seems only to even have TBody and not THead or TFoot.
Chris
If you have more than one tbody, you can apply a CSS class to each -- thus allowing differing styles for contiguous rows without having to specify class on each row. That may reduce code bloat.
An example might be a table whose first five rows are highlighted as special offers, next n are normal sales and last few are special bargains. With three tbodys you can apply the special stylings just once not matter how many rows you have.