The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Fixed header table using CSS and HTML. No Javascript
I am trying to make a table with a fixed header scrollable with out using any javascript.
Here are two examples. 1. http://www.imaputz.com/cssStuff/bigFourVersion.html This won’t work because I won’t know the dimensions of the table as it comes from a database 2. http://fixedheadertable.com/demo/multipletablesdemo.html This is the exact functionality I would like to achieve but without the use of JS or JQ.
I can’t find a solution on the web that isn’t very hackish and ugly. Does anyone have any suggestions?
Why don’t you just do what #2 did? They used javascript in that example, but they didn’t have to.
Create 3 tables. A header table, body table and footer table. Wrap them in divs, set a height for each and set ‘overflow: auto’ to the body’s div.