I have a deck of bootstrap cards that looks as follows:
<div class="card-deck">
<div class="card">
<img class="card-img-top" src=".." alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card">
<img class="card-img-top" src=".." alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card">
<img class="card-img-top" src=".." alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
The problem is that i want them to stack in such a way that the rows looks the same. Currently, when the screen is at a size such that 2 of the cards are on top and one is on the bottom, the cards are different sizes. I want it to be so that the cards are always the same size as each other, and in the case where there are 3 cards and only 2 will fit horizontally, the 3rd card is the same size as the 2 on top, however floated to the left. The problem I am having is that i cannot simply set min and max widths since the size of the cards changes, I just want the size of them to always change together so that they are the same.
current result
desired result example
I would like it to look like the desired result (without the card on the bottom right)