Well, that should be quite simple. I have the following CSS snippet:
.nav-item > .nav-link:not(.active)::after {
content: "test";
display: block;
width: 0;
border-bottom: solid 2px #019fb6;
transition: width .3s;
}
However, I'd like to do something like that:
.nav-item::after > .nav-link:not(.active) {
content: "test";
display: block;
width: 0;
border-bottom: solid 2px #019fb6;
transition: width .3s;
}
And finally:
.nav-item:hover::after > .nav-link:not(.active) {
width: 100%;
}
I'm trying to create a hover effect that only works on nav-items that doesn't have the "active" class. But, that ins't working. What am I doing wrong?
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>
Thanks in advance.