Having trouble implementing a hover effect with a bottom border in the Bootstrap navbar, similar to this:
https://i.sstatic.net/sbqt4.png
However, my current result looks like this:
https://i.sstatic.net/JXghl.png
I want to adjust the bottom border to span the entire height of the navbar.
.nav-link:visited,
.nav-link:link {
border-bottom: 2px solid transparent;
}
.nav-link:hover,
.nav-link:active {
border-bottom: 2px solid #1bcfc6;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark ">
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="./home.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./about.html">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./product.html">Products</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./contact.html">Contact Us</a>
</li>
</ul>
</div>
</nav>