When utilizing Bootstrap 5 with Bootstrap Icons, I decided to increase the size of the icon using font-size:1.5rem;
. However, this caused a disruption in the vertical alignment for the links (It works fine when the styling is removed and Full Page mode is active).
I struggled to find the correct method to realign it vertically:
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="670508081314131506174a0e0408091427564956574955">[email protected]</a>/font/bootstrap-icons.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1b7974746f686f697a6b5b2e35293528">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1e7c71716a6d6a6c7f6e5e2b302c302d">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-light fixed-top shadow-sm" id="mainNav">
<div class="container">
<a class="navbar-brand fw-bold" href="/">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="bi-list"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto me-4 my-3 my-lg-0 text-center d-flex align-items-center">
<li class="nav-item"><a class="nav-link me-lg-3" href="#">Menu Item #1</a></li>
<li class="nav-item"><a role="button" class="nav-link me-lg-3"><i class="bi bi-stack-overflow" style="font-size:1.5rem;"></i>Menu Item With Icon</a></li>
<li class="nav-item"><a class="nav-link me-lg-3" href="#">Menu Item #3</a></li>
</ul>
</div>
</div>
</nav>