Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link color stays blue after clicking until somewhere else on viewport is clicked

In my CSS, I've tried setting font color of my navbar a elements to black using :link, :visited, :hover, and :active selectors but nothing is changing it. I think my title states my problem clearly enough, but here's a link to my website, which is where I'm trying to fix it: http://students.washington.edu/jgb93/info343/portfolio/#/

Basically if you try clicking on one of the links in the navbar, it'll change it'll turn blue temporarily. If anywhere else on the viewport is clicked, the blue will change back to the black that I want it to be. Any suggestions as to what is causing this?

This is all I have going on for the navbar in my HTML, the rest is done in CSS:

            <div id="navbar" class="navbar navbar-default navbar-fixed-top">
            <nav>
                <ul id="navlist">
                    <li class="navitem"><a class="link" ui-sref="home">Home</a></li>
                    <li class="navitem"><a class="link" ui-sref="about">About</a></li>
                    <li class="navitem"><a class="link" ui-sref="contact">Contact</a></li>
                </ul>
            </nav>
        </div>
like image 934
Julian Avatar asked Dec 30 '15 06:12

Julian


1 Answers

There are CSS conflicts. To debug CSS, you could try the browsers built-in developer tools by pressing F12 or using firebug in Mozilla Firefox.

So, to solve the problem:

.navitem a:focus{color:#000;}
like image 196
Rusty Avatar answered Nov 07 '22 09:11

Rusty