As you can see in my snippet, both columns are getting their heights set to the height of the tallest column. I however want my columns to have their heights set to the shortest column, where the second column would have overflow scroll instead.
I do not know the height of either of the columns as their content is loaded in dynamically.
I also do not need to use grid if flex can acheive my desired result.
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.item1 {
background-color: #00ffff;
}
.item2 {
background-color: #ff00ff;
overflow-y: auto;
}
<div class='grid'>
<div class='item1'>
<div class='item1_content'>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
</div>
</div>
<div class='item2'>
<div class='item2_content'>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
</div>
</div>
</div>