Finkelson Finkelson - 1 year ago 135
CSS Question

How to restore color in css after mouse leave?

When I click on the button in my header it changes the color to #699fca (as expected). But when mouse leaves the button the color changes to gray. I want to get it 699fca (not gray).

Here is my example:

Answer Source

You need to add css for the visited state of the link, which is what is applied after it has been clicked. Something like this:

.navbar-nav > li > a:visited {
    background-color: #699fca;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download