0

I have a page where I output some data inside a table. The table usually has a lot of columns, which makes me scroll horizontally. However, when I scroll to the right I can no longer see the labels that the data corresponds to. I would like to keep the label in place, so what I thought to do is to add a bit of jQuery magic. Before I do that I wanted to run it by someone to see if there's anything I may be missing.

I thought of:

  1. Using clone() to copy table
  2. Insert an ID for cloned table
  3. Delete all cells except the ones in the first column
  4. Add inline CSS to keep position fixed, change z-index to hover above original table
  5. Possibly get vertical position of the original table to position it properly

Does this sound like the right approach or is there a better way to do this?

santa
  • 12,234
  • 49
  • 155
  • 255
  • Do you just want first column always visible? http://stackoverflow.com/questions/1312236/how-do-i-create-an-html-table-with-fixed-frozen-left-column-and-scrollable-body/17557830#17557830 – sinisake May 05 '14 at 00:08
  • I think this is exactly what I was trying to get. Thanks for the tip! – santa May 05 '14 at 01:49

0 Answers0