wrote:
>This beautiful code allows a table header to be not scrollable in IE.
>Since Firefox does not support this CSS method expression(...), the
>code does not do the desired work in Firefox or other Mozilla browsers.
>What is the workaround here? I tried position: fixed for Mozilla, but
>it is making my table header unrelevant to the table, as if these are
>two different objects.
In Firefox you can use the <tbody> element to surround the body of the
table and use appropriate CSS to make it scrollable:
<table>
<thead>
<tr bgcolor="#FFFFCC">
<td align="center">
Respondent Name
</td>
<td align="center">
Company Name
</td>
<td align="center">
Solicitation Number
</td>
</tr>
</thead>
<tbody style="overflow:auto;height:200px;width:100%">
<tr>
<td align="center">102803</td>
<td align="center">102803dgs</td>
<td align="center">215872321</td>
</tr>
<tr>
<td align="center">102903</td>
<td align="center">102903</td>
<td align="center">215872324</td>
</tr>
</tbody>
</table>
IE doesn't properly handle style="overflow" in <tbody>. (I don't know
whether this is fixed in IE7.) If there's a way that works in both
browsers, I don't know what it is.
--
Tim Slattery