October 29th, 2007 05:35 AM
#1
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
October 29th, 2007 06:42 AM
#2
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?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
October 29th, 2007 08:17 AM
#3
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.
October 29th, 2007 08:33 AM
#4
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.
Code:
<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>
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
October 29th, 2007 10:16 AM
#5
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?
October 29th, 2007 10:46 AM
#6
Re: Freezing Header of the table
Originally Posted by
haifriends
Number of columns is not fixed, so i cannot get the width of the column.
I said width, not number of columns.
Originally Posted by
haifriends
Is there any possible way to freeze the header of the table?
I just provided you with the only way.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks