View Full Version : Scrolling Table Headers ?!?!

12-13-2006, 03:02 PM
Script: Floating Menu Script
URL: http://dynamicdrive.com/dynamicindex1/staticmenu.htm

I created a page using a combination of PL/SQL and HTML. I
have a table with alot of data, so when the user scrolls
down they can't see the header. I was browsing JavaScripts
to see how i could make the header row static/float along
as the page is scrolled down. And i found this great script!
I put the table's header row into its own "table" and it worked
beautifully!!! :) ...EXCEPT for 2 problems i have now:

1. When the Header was still part of the Real Table, of course,
each column in the header row was as wide as the width of the
corresponding column of Real Table data.
Now that the Header is in its own "table", the width of each
column in the Header is according to the width of the Header text.
HOW do i make it that each column in the Header's width will
correspond to the respective column in the Real Table's width?

2. The width of the Real Table is 100% (of the page). I made
the width of the Header also 100%. The problem is that the Real
Table has many columns, with alot of data, and they don't all
fit on the screen at once, so you have to scroll sideways to see
some of the columns. But the Header does fit on (100% of) the
screen, because all it has to fit is the all of the text of
each column's header. So now the Header and Real Table are off!
HOW do i make the Header's (table-)width correspond to the width
of the Real Table?

Ideas, anyone???

Thank you!