JSFiddle - React, Tailwind, and code Playground
by Front Dev
HTML
<div id="container2">
<div class="container--inner">
<div id="leftCol2">
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
<p>In this example this div is heigher.</p>
</div>
<div id="rightCol2">How to adjust the divs automatically to the height of the other.</div>
</div>
</div>
CSS
body, html {
height:100%;
}
#container2 {
margin: 10px auto;
width: 927px;
}
.container--inner{
display:table;
}
#leftCol2 {
width: 195px;
background: #FCF;
z-index:-1;
padding:0;
margin:0;
display:table-cell;
}
#rightCol2 {
width:732px;
background: #CFF;
z-index:1;
padding:0;
margin:0;
display:table-cell;
}