| Author |
Align Two Tables Vertically
|
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1260
|
|
|
I have two tables which was originally one. But I want the table rows to be able to scroll and leave the header row visible. So I created a one row table fro the header and a second row for the data rows. Now even though I have set the width on each column in both tables the same I am still getting the columns out of align especially when the data row table displays a scroll bar.
|
 |
K West
Ranch Hand
Joined: Sep 10, 2008
Posts: 58
|
|
That is not the right way to do so. You may want to search google for Fixed header HTML tables. Or here is one JQuery plugin I have tried Scrollable Fixed Header Table
|
Years teach us more than books.
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Seems like in another thread of yours (maybe it wasn't yours) I made this suggestion.
Create a thead section for your table as well as a tbody section. Make the tbody overflow: auto; and create an empty header column with a width of about 25px to account for the scroll bar.
|
 |
 |
|
|
subject: Align Two Tables Vertically
|
|
|