• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on table heading and table columne alignment  RSS feed

 
Yani Lee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page where a session bean with a Vector of Objects is passed in. I want to display selected fields for each element from this Vector in a table somewhere in the page. The list can be large/long both vertically
and horizontally. The table is to be within a <html:form> and so naturally I would like to have the submit buttons stay on the page while I scrolling through the data table. So I am thinking using <div> to make the table inside the page. I would like to leave the column headings stay above the column data no matter where I scroll into the data table. It seems like I
can do that with two tables, one table with all the column headings, the second table contains the data which will be between the <div> </div> tags in which I can scroll both vertically and horizontally.
I have two problems with this plan:
1. how can I always make the column headings match the corresponding column data, i.e.., when I scroll horizontally on the data table in the <div>, I want the table with the headings also "scroll" accordingly.
2. I want noWrap for all of the columns of the data table in the <div>, since I don't know the largest length of the dynamically supplied data by the session bean, so I can't specify a fixed width for the <td> in this data table in the <div>. because it seems like that if the specified width of <td> is smaller than the length of the real data, wrapping will still happen. So I have a very difficult time aligning the table heading columns with the data table columns that is in the <div> tag.
Any suggestions or help are greatly appreciated very much,
Yani Lee
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!