I have a basic card, divided into 3 sections:
<div class="card" style="width: 350px; height: 250px;">
<div class="card-body">
<div class="d-flex flex-column" style="height: 100%;">
<div class="p-2" style="height: 30%">1</div>
<div class="p-2" style="height: 50%;">2</div>
<div class="p-2" style="height: 20%;">3</div>
</div>
</div>
</div>
Now, I want to make sure the text is vertically aligned to the middle for the second section, without applying that to the other 2 sections. I was looking at align-items-center
and align-self-center
, but I'm struggling getting this right... Any help is much appreciated!
Update: fiddle is here.