I'm wanting to populate the blocks dynamically. In reality, there would be a for loop to send the data through. However, I'm having some issues with its height at different screen sizes using bootstrap 4. I would like the columns to have the same height with each other (take the longest height within the max-height limit) when resizing as the text is pushing to extra lines on smaller window size.
Issue:
Ideal result:
Any tips would be greatly appreciated!
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<!--BLOCK-->
<div class="col-12 col-md-6 col-lg-3 mb-5">
<a class="no-underline" href="/">
<div class="d-flex flex-column bg-warning">
<img src="https://picsum.photos/200" />
<div class="col-12 d-flex flex-column pt-3">
<h3>Title</h3>
<p>Lorem ipsum dolor </p>
<div class="align-self-center mb-3">
<button class="btn btn-success">View More</button>
</div>
</div>
</div>
</a>
</div>
<!--BLOCK ends-->
<div class="col-12 col-md-6 col-lg-3 mb-5">
<a class="no-underline" href="/">
<div class="d-flex flex-column bg-warning">
<img src="https://picsum.photos/200" />
<div class="col-12 d-flex flex-column pt-3">
<h3>Lorem ipsum dolor sit amet</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<div class="align-self-center mb-3">
<button class="btn btn-success">View More</button>
</div>
</div>
</div>
</a>
</div>
<div class="col-12 col-md-6 col-lg-3 mb-5">
<a class="no-underline" href="/">
<div class="d-flex flex-column bg-warning">
<img src="https://picsum.photos/200" />
<div class="col-12 d-flex flex-column pt-3">
<h3>Title</h3>
<p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<div class="align-self-center mb-3">
<button class="btn btn-success">View More</button>
</div>
</div>
</div>
</a>
</div>
<div class="col-12 col-md-6 col-lg-3 mb-5">
<a class="no-underline" href="/">
<div class="d-flex flex-column bg-warning">
<img src="https://picsum.photos/200" />
<div class="col-12 d-flex flex-column pt-3">
<h3>Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
<div class="align-self-center mb-3">
<button class="btn btn-success">View More</button>
</div>
</div>
</div>
</a>
</div>
</div>
</div>