I have a bootstrap layout like this:
<div class="container">
<div class="row">
<div class="col-sm-6">
<div>
This block should be the same height as the right column.
The content in this block is in a scrollable container.
The scrollable container currently has a fixed height set to allow scrolling.
</div>
</div>
<div class="col-sm-6"></div>
<div>Block 1 content</div>
<div>Block 2 content</div>
</div>
</div>
Currently on desktop the layout looks like this:
When I switch to smaller screen size breakpoints the layout changes to this:
I would like the scrollable area to take on the same height as the two content blocks on the right. I have tried using display: flex
on the row but it displays the entire content of the scrollable area if I remove the specified height from it, which is not what I want.
I basically want the right column dictate the height for the left column.
At the moment I'm using JavaScript to do the resizing but ideally I would like to do this in CSS if possible.
JsFiddle: https://jsfiddle.net/b12ybxpm/