Admin Forum:Resize to maximum element

I have a series of inline-tables, like these:

The header cell's height can be various, so I want to make all the table (basically the captions) the same, equals to the maximum height of the series. I cannot wrap them under a container, or rather the tables are on more then one line, like this:

So I cannot find a solution with CSS only, how can I do it with JS?