JSFiddle - React, Tailwind, and code Playground
by josangel555
HTML
<div class="w">
<div class="j b">
<pre>s
d
d
d
</pre>
</div>
<div class="k b">
<pre>d
d
d
d
d
d
d
</pre>
</div>
</div>
CSS
.b{outline: 1px solid red}
.j{width: 30%; float: left; height: auto;}
.k{width: 30%; float: left; overflow-y: scroll;}
JavaScript
var height = $('.j').height();
$('div.k').css("height", height);