I've been struggling to make a Bootstrap card fit perfectly within a container that has a fixed height. I've tried using the typical rules like max-height, but nothing seems to be working.
Check out this jsfiddle for reference: https://jsfiddle.net/aq9Laaew/263168/
Here's the code as well:
HTML:
<div class="container">
<div class="row">
<div class="col wrapper">
<div class="card bootstrap-card" style="width: 18rem;">
<img class="card-img-top" src="http://placehold.it/560x560" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div>
</div>
</div>
CSS:
.wrapper {
background-color: yellow;
height: 60vh;
}
.bootstrap-card {
max-height: 100%;
}
Any advice would be greatly appreciated!