I incorporate Bootstrap's nav component into my website design.
Occasionally, when hovering over the navigation links, they display as green as intended. However, there are instances after reloading the page or returning from a link where the links default back to blue when activated and hovered over.
Here is the code snippet for the navigation:
<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link" href="#">test</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">test2</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">test3</a>
</li>
</ul>
In my CSS, I have defined the following styles for the navigation:
a.nav-link {
color: #68b347;
}
ul.nav a:hover {
color: #4d8533 !important;
}
ul.nav a:active{
color: #4d8533 !important;
}
Although the styling generally works fine, there are occasional glitches that require a site restart to resolve.