• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Align Two Tables Vertically

 
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 58
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic