I am struggling to make two columns of equal height. The content is constantly changing. I have a layout with normal columns (33% width each) on desktop, but on mobile I want the columns to stack. I attempted wrapping them with .row
and using 'd-flex', but it didn't work.
Check out my Codepen for reference:
https://codepen.io/olefrankjensen/pen/RxXEBN
I would appreciate any help since I'm still learning about Flexbox.
.ContractTemplateDetails {
cursor: pointer;
border: 1px solid #ccc;
padding: 2rem !important;
height: 100%;
}
/* More CSS styles here */
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.2/css/bootstrap.css" rel="stylesheet"/>
<div class="container">
<div class="row d-flex component-margin-top-small justify-content-center">
<section class="ContractTemplateDetails mt-sm-0 col-sm-4 d-inline-flex flex-column align-items-center justify-content-center unselectable mr-sm-2" data-template-id="18">
<div class="contract-image"><img class="" src="http://freevector.co/wp-content/uploads/2010/05/29358-toy-car-outline.png" alt="Contract Basic"></div>
<!-- More HTML markup here -->
</section>
<section class="ContractTemplateDetails mt-sm-0 col-sm-4 d-inline-flex flex-column align-items-center justify-content-center unselectable mt-3 checked" data-template-id="19">
<div class="contract-image"><img class="" src="http://freevector.co/wp-content/uploads/2010/05/29358-toy-car-outline.png" alt="OmniCar Premium"></div>
<!-- More HTML markup here -->
</section>
</div>
</div>