-3

I want to fix the first line (total line) of my table (tbody) so it can be visible when scrolling.

I tried all combination between absolute/fixed/relative position but it didn't work.

Please check this jsfiddle, I want to fix the "fixedTable" so it can be always visible and to scroll inside the parent div not out of the parent div

t

Thanks for your help.

1 Answers1

1

You may use one single table to keep the sorting and readability of your datas , and fixed thead or tfoot as a trick inside a container.

http://codepen.io/gcyrillus/pen/aJysI This was an answer to a french forum for a table that had row and colspan in header and needed somehow to be scaled without breaking columns.

The trick is to clone thead as a tfoot and set in absolute position tfoot.
Tfoot overlap your table and on topscroll 0, it stands over thead. Parent container is scrolling table underneath of tfoot.

G-Cyrillus
  • 101,410
  • 14
  • 105
  • 129