JSFiddle - React, Tailwind, and code Playground

by fnostro

HTML

<div id="container">
    <div id="x" class="y">x</div>
    <div id="y" class="y">x
        <br>y</div>
    <div id="z" class="y">x
        <br>y
        <br>z</div>
</div>

CSS

div {
    border: 1px solid blue;
}
.y {
    vertical-align:top;
    display: inline-block;
    width:50px;
    height:auto;
}

JavaScript

var maxheight = 0;

$('div div.y').each(function () {
    maxheight = ($(this).height() > maxheight ? $(this).height() : maxheight);
});

$('div div.y').height(maxheight);