Making a scrollable table with fixed header and fixed sidebar

riccardolardi picture riccardolardi · Mar 21, 2013 · Viewed 33.6k times · Source

I need to always display the header and sidebar indexes, but let the content be scrollable freely x & y ... any solutions to this problem?

I have looked at DataTables jQuery plugin (example: link), but I was wondering if there were any alternatives.

Answer

Sahil Popli picture Sahil Popli · Mar 21, 2013

You can put One thing Fixed

Header if horizontal scrolling

Demo : Horizontal scroll table

Sidebar If Vertical Scrolling

Demo : Fiddle with Vertical Scroll

or your [strange] case

Demo: Both things fixed // Not recommended


And what exactly you want is here

Demo : With Basic styles Link is Broken Now Please Use this Instead

Source Code : snipt.org