Freezing Header of the table

Hi,

I'm using JSP to display the content from the database in the form of Table. Table Rows and Columns are not statis, it may vary..

I want to Freeze header of the table. I'm using MAC OS and using Safari as my Web Browser.

Can anyone guide me?

-haifriends
[303 byte] By [haifriends] at [2007-11-20 11:44:16]
# 1 Re: Freezing Header of the table
What do you mean freeze the header of your table? Does the content dynamically change even after the page is loaded?

Why don't you define the top <tr><td>...</td>...</tr> section and then after that code loop through the database?
PeejAvery at 2007-11-8 0:43:28 >
# 2 Re: Freezing Header of the table
I want to freeze the top header portion and just scroll the content part.

The first row of the table will have the heading of each column. This first row to be locked.

Please guide me to solve this problem. I'm using Safari Browser.
haifriends at 2007-11-8 0:44:28 >
# 3 Re: Freezing Header of the table
Well, a table itself cannot do this, but you can build a table with the header row and then another table inside a scrolling div. You will have a problem with lining up the columns if you don't supply a fixed width.

<table>
<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
<tr>
<td colspan="2">
<div style="overflow: scroll">
<!-- add the other table here -->
</div>
</td>
</tr>
</table>
PeejAvery at 2007-11-8 0:45:33 >
# 4 Re: Freezing Header of the table
Number of columns is not fixed, so i cannot get the width of the column.

Is there any possible way to freeze the header of the table?
haifriends at 2007-11-8 0:46:27 >
# 5 Re: Freezing Header of the table
Number of columns is not fixed, so i cannot get the width of the column.
I said width, not number of columns.

Is there any possible way to freeze the header of the table?
I just provided you with the only way.
PeejAvery at 2007-11-8 0:47:31 >