Struggling to vertically center the title of a card in Bootstrap 4 when using the <h>
tag. Despite trying various bootstrap classes like align-middle
and combinations like .d-flex
+ align-self-center
, nothing seems to be working as expected. I'd prefer not to resort to custom CSS for this - is there a built-in BS4 solution?
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="card border-info" style="width: 100%;">
<div class="card-header text-white bg-info">
<h6 class="align-middle">Example Title</h6>
</div>
<div class="card-body">
</div>
</div>