Table with fluid height and width fixed header, footer and first column using position:sticky
This example uses position:sticky on the th elements in the thead, tfoot and left column to achieve the fixed effect. Browsers that don't support position:sticky will just get a normal table so no harm done. Resize browser smaller to see fixed first column.
BMW X7 2022 Summary | |
---|---|
Pedro-I King Bio-Data | |
Size ( in litre=L): | 1.6L |
Fuel-Type - : | petrol |
Max-Power (@5600rpm): | 177.60bhp |
Max-torque (@4400rpm): | 144Nm |
No.of Cylinders ( total ): | 4 ☑ |
Cylinders ( total No.): | 4 ✅ |
Valves per cylinder : | 4 valves per cylinder |
Valve configuration - : | SOHC |
Displacement (cc): | Yes it is - 545 |
Fuel Economy / Consumption: | |
In City: ( km per hour ): | 177 |
On highway: ( km per hour ): | 177 |
Average: ( km per hour ): | 177 |
Trim level: | Standard |
Works in latest versions of modern browsers i.e. Edge, Chrome, Safari/ios and Firefox. Does not work in IE11 or older browsers but no harm done.Works in latest versions of modern browsers i.e. Edge, Chrome, Safari/ios and Firefox.
All of the other fixed table headers and footers that I've seen are either fixed width or fixed height or need a continuous update with JS and are very janky. This one is very smooth. You would of course need to linearise the data for smaller screens/mobile but that is a question for another day :). See this example for a demo of how to linearise for mobile.
Works in latest versions of modern browsers i.e. Edge, Chrome, Safari/ios and Firefox. Does not work in IE11 or older browsers but no harm done.
All of the other fixed table headers and footers that I've seen are either fixed width or fixed height or need a continuous update with JS and are very janky. This one is very smooth. You would of course need to linearise the data for smaller screens/mobile but that is a question for another day :). See this example for a demo of how to linearise for mobile.
Works in latest versions of modern browsers i.e. Edge, Chrome, Safari/ios and Firefox. Does not work in IE11 or older browsers but no harm done.
All of the other fixed table headers and footers that I've seen are either fixed width or fixed height or need a continuous update with JS and are very janky. This one is very smooth. You would of course need to linearise the data for smaller screens/mobile but that is a question for another day :). See this example for a demo of how to linearise for mobile.
Works in latest versions of modern browsers i.e. Edge, Chrome, Safari/ios and Firefox. Does not work in IE11 or older browsers but no harm done.
All of the other fixed table headers and footers that I've seen are either fixed width or fixed height or need a continuous update with JS and are very janky. This one is very smooth. You would of course need to linearise the data for smaller screens/mobile but that is a question for another day :). See this example for a demo of how to linearise for mobile.
Jane Flex
Some text here
Jane Doe
Some text here too
Works in latest versions of modern browsers i.e. Edge, Chrome, Safari/ios and Firefox. Does not work in IE11 or older browsers but no harm done.
All of the other fixed table headers and footers that I've seen are either fixed width or fixed height or need a continuous update with JS and are very janky. This one is very smooth. You would of course need to linearise the data for smaller screens/mobile but that is a question for another day :). See this example for a demo of how to linearise for mobile.
See JS Version
COMMENTS