The table is cloned with JS and then absolutely placed on top of the original table. The cloned copy has the tbody hidden and thus revealing just the footer and header. The content in the body is set to line-height:0 so that the table height can be controlled to exactly 300px (one row of the table needs to have a small line-height or the table height collapses to zero). To avoid the issue with scrollbars eating up space the absolutely placed table is positioned within a holding div that already has scrollbars and thus will account for the different scrollbar widths of browsers, or indeed if scrollbars are only overlaid when needed as in Mac systems.
BMW AWD MY(comparison) | AUDI ModelY(AWD 2024) | Ferrari ModelZ(AWD 2024) | Acura ModelXX(AWD 2024) |
---|---|---|---|
Body and Drive | |||
Size (in litre=L) | 10044- | 10044- | 1.6L- |
Fuel-Type -------- | 10044- demo data here ! ☑ | also-- link css ☑ | 1.6L- more here for sample |
Max-Power--- -- --(@5600rpm) | 10044- demo data here ! ☑ | 10044- demo data here ! ☑ | 1.6L- more here for sample |
Engine & Power Output | |||
Dimensions☑curb weight/height/length(inch.) | 1.6L- more here for sample | 1.6L- more here for sample | 10044- demo 00 data here ! ☑ |
Note-if 1st cell set as 'th'(@4400rpm) | 10044- demo ==== data here ! ☑ | 1.6L- more here for sample | 1.6L- more here for sample |
Note-if 1st cell set as'td'.(@4400rpm) | 1.6L- more here for sample | 1.6L- more here for sample | 10044- demo 00 data here ! ☑ |
BBMW AWD SUV(Versions) | AUDI ModelY(Entry level) | Ferrari ModelZ(Entry level) | Acura ModelXX(Entry level) |
The table is cloned with JS and then absolutely placed on top of the original table. The cloned copy has the tbody hidden and thus revealing just the footer and header. The content in the body is set to line-height:0 so that the table height can be controlled to exactly 300px (one row of the table needs to have a small line-height or the table height collapses to zero). To avoid the issue with scrollbars eating up space the absolutely placed table is positioned within a holding div that already has scrollbars and thus will account for the different scrollbar widths of browsers, or indeed if scrollbars are only overlaid when needed as in Mac systems.
COMMENTS