Home > Software design >  Bootstrap navs hover
Bootstrap navs hover

Time:09-01

I use nav from bootstrap in my website.

When hovering over it then sometimes it is green(as it should be, but sometimes when you reload the website or jump back from a link then the link is blue(default value) when activating and hovering over it.

I use this version of nav

  <ul >
    <li >
        <a  href="#">test</a>
    </li>
    <li >
        <a  href="#">test2</a>
    </li>
    <li >
        <a  href="#">test3</a>
    </li>
</ul>

And in css I have so far used the

a.nav-link {
    color: #68b347;
}

ul.nav a:hover {
    color: #4d8533 !important;
}

ul.nav a:active{
    color: #4d8533 !important;
}

Everything works, but sometimes it does not work and you have to restart the website


CodePudding user response:

try to add this to your css

ul.nav a:visited {
color: #68b347 !important;
}

Then it should always be green

  • Related