Challenge:
Use div tag with overflow:auto to create scroll bar for a table. However, need the first row (column headers) outside of the scrolling section.
Problem:
Initially, I had the div tag around the table
This works as far as scrolling goes. However, it also scrolls the first row which contains my column headers.
I would like to use a div tag inside the table tag to keep the first row out. However, I get erratic results when I do this.
I do not want to put the column header row in a separate table outside of the div tag because then I have column width issues. The column header table and the data table column widths never line up without a lot of difficulty.
Ideas?
Use div tag with overflow:auto to create scroll bar for a table. However, need the first row (column headers) outside of the scrolling section.
Problem:
Initially, I had the div tag around the table
Code:
<div style="overflow:auto;height:300">
<table>
<tr><td>[b]Row with headings[/b]</td></tr>
<tr><td>2nd row</td></tr>
<tr><td>3rd row</td></tr>
etc...
<tr><td>20th row</td></tr>
</table>
</div>
This works as far as scrolling goes. However, it also scrolls the first row which contains my column headers.
I would like to use a div tag inside the table tag to keep the first row out. However, I get erratic results when I do this.
I do not want to put the column header row in a separate table outside of the div tag because then I have column width issues. The column header table and the data table column widths never line up without a lot of difficulty.
Ideas?