I'm currently working on incorporating Bootstrap 4.1's align-middle into a col
nested within a row
. Despite my efforts, the content within is not aligning to the middle as expected. Take a look at my code below:
<body class="d-flex">
<div class="container-fluid">
<a class="my-container" href="#">
<div class="row">
<div class="col flex-grow-1">
Line 1<br>Line 2<br>Line 3
</div>
<div class="col-auto text-right align-middle">
<i class="fas fa-chevron-right"></i>
</div>
</div>
</a>
</div>
</body>
Displayed here is a snippet of the outcome:
<link href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" rel="stylesheet"/>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<body class="d-flex">
<div class="container-fluid">
<a class="my-container" href="#">
<div class="row">
<div class="col flex-grow-1">
Line 1<br>Line 2<br>Line 3
</div>
<div class="col-auto text-right align-middle">
<i class="fas fa-chevron-right"></i>
</div>
</div>
</a>
</div>
</body>
What adjustments can be made to correctly position the icon in the center?