Incorporating Bootstrap 5 into my project, I am facing a challenge with vertically aligning text in an li
element. Despite trying various techniques mentioned in the Bootstrap documentation for middle/center alignment, none of them seem to be effective. I attempted adding the align-middle
class to each individual element, and also thought that align-items-center
would solve the issue, but it did not. What could I possibly be overlooking?
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class=''>
<i class="bi bi-circle me-2 text-muted" style="font-size: 1.5rem;"></i>
<label class="form-check-label">
<a target="_blank" class="text-success" href="https://www.facebook.com/">Follow on Facebook</a>
</label>
</div>
<span class="badge bg-primary rounded-pill">+2</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class=''>
<i class="bi bi-circle me-2 text-muted" style="font-size: 1.5rem;"></i>
<label class="form-check-label">
<a target="_blank" class="text-success" href="https://www.instagram.com/">Follow on Instagram</a>
</label>
</div>
<span class="badge bg-primary rounded-pill">+5</span>
</li>
</ul>
https://i.sstatic.net/8fS86.png
EDIT: To clarify, the goal is to align the text vertically.