So, I have this CSS snippet here:
.nav-item > .nav-link:not(.active)::after {
content: "test";
display: block;
width: 0;
border-bottom: solid 2px #019fb6;
transition: width .3s;
}
But now, I want to try something different:
.nav-item::after > .nav-link:not(.active) {
content: "test";
display: block;
width: 0;
border-bottom: solid 2px #019fb6;
transition: width .3s;
}
And lastly:
.nav-item:hover::after > .nav-link:not(.active) {
width: 100%;
}
I am attempting to create a hover effect that only applies to nav-items without the "active" class. But for some reason, it's not working as expected. Can anyone point out what mistake I might be making?
Here is the HTML:
<li class="nav-item"><a class="nav-link text-left" href="#">Second Item</a></li>
<li class="nav-item"><a class="nav-link text-left active" href="#">FirstItem</a></li>
Thank you in advance.