Ticket #1105 (closed enhancement: invalid)
plugin desired for tables: keep thead in viewport as long as any of the table is in the viewport
|Reported by:||dkg||Owned by:|
Description (last modified by dmethvin) (diff)
This is a similar request to #981, but handled differently (and, alas, i don't have a patch or a plugin for it yet).
My concern is with very wide tables (wider than the browser window) which also happen to be very tall. My ideal situation would have the THEAD element react properly when the viewport is scrolled, and position itself vertically at min(bottom of tbody, max(top of the viewport,top of tbody)). This would let you do spreadsheet-style work directly in the browser, using the parent document's scrollbar, while keeping an overlay of the header information needed to tell what's going on.
My initial thought at implementing this was to simply make the TH elements of a table "position:relative" and adjust their "top" value. Unfortunately, in the gecko renderer, "position: relative" doesn't appear to have any effect on TH elements (though i can't find a reference to why at the moment.
Wrapping the contents of each TH with a DIV and making that DIV "position: relative" works better, but some nice tools (e.g. tableSorter) don't seem to like the extra layer inside the DIV very much. Any suggestions pointing me in the right direction would be welcome.