I'm sure this is an easy problem to solve, but I'm just not much of a html/css wizard yet!
I have a table that I generate and the spec calls for there being a fixed header while allowing the body to be scrollable.
The problem is, now the horizontal direction is scrollable also, which I don't want it to be. There is no reason it can't be fixed. It looks like the presence of the scroll bar for the vertical direction takes up space so that the browser now thinks that it needs a horizontal scroll to fit in the horizontal content. Frustrating!
Here is what I have so far:
<table cellspacing="0" cellpadding="4" border="1" bordercolor="cccccc">
<thead style="position:relative;">
<tr bgcolor="eeeeee">
<td>Column 1 Header</td>
<td>Column 2 Header</td>
</tr>
</thead>
<tbody style="overflow-y:auto;overflow-x:hidden;height:480px;">
<tr>
<td>Some data</td>
<td>Some more data</td>
</tr>
<tr>
<td>Some data</td>
<td>Some more data</td>
</tr>
<tr>
<td>Some data</td>
<td>Some more data</td>
</tr>
<tr>
<td>Some data</td>
<td>Some more data</td>
</tr>
</tbody>
</table>