Is there a way to autosize HTML table height based on content? Also if it’s a cell (or cells) next to a neighbor cell with multiple rowspans.
E.g. if I have a table like this (cell on the right has Rowspan=”2″ and height of the cell content = 600px, in each cell on the left height of the cell content = 150px):

there is a gap between 2 cell consents on the left because cells themselves autosized their height. I’d like it to look like this:

Where top cells automatically collapse to cell content height. Is there anyway to achieve this?
This sets the last row of cells to the correct height (demo):
It should be trivial to convert this into plain JavaScript.
Update: For more complicated tables, you’ll want to replace the last line with this (demo):
The idea is to call
grow()on every cell, starting with the last row and working upwards.