Seeking assistance with customizing a navbar using Bootstrap 4 and flexbox. The desired design is to have the logo centered, with equal space on either side for the links.
--------------------------------------------------------------
| | Link | Link | Logo | LongerLink | LongerLink | |
--------------------------------------------------------------
The problem I'm facing is that the LongerLink items are taking up more space than the shorter Links, causing the logo to be off-center. How can I resolve this issue? See code below:
.navbar {
background-color: #389FCE;
height: 100px;
display: flex;
}
.navbar-nav {
width: 100%;
display: flex;
flex: 1;
min-width: 0;
justify-content: space-between;
align-items: center;
}
.nav-link {
font-family: 'Nexa-Bold', sans-serif;
font-style: normal;
font-weight: 700;
font-size: 20px;
color: white;
line-height: 80px;
}
<nav class="navbar navbar-expand-sm">
<button class="navbar-toggler" data-toggle="collapse" data-target="#collapsibleNavbar" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon">
<i class="fas fa-bars" style="color:white; font-size:28px;"></i>
</span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav nav-fill w-100">
<li class="nav-item">
<a class="nav-link" id="shortLink" href="#">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link" id="shortLink" href="#">ABOUT</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src="images/Logo_navbar.png">
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="longLink" href="#">PRODUCTS</a>
</li>
<li class="nav-item">
<a class="nav-link" id="longLink" href="#">CONTACT</a>
</li>
</ul>
</div>
</nav>