I created a navigation that underlines the links on hover (sliding underline starting from the middle going outward) and also transforms the link from a dark green to a lighter green. This works totally fine except when one of the links has been clicked on and it becomes a "visited" link: when I re-click a visited link the sliding underline still works but the color will not transform from dark to light green, it just stays as dark green. I've tried everything I can think of but can't get a visited link to transform it's color like a non-visited link.
HTML:
<div id="topNavigation">
<ul>
<li><a href="encyclopedia.html">ENCYCLOPEDIA</a></li>
<li><a href="journal.html">JOURNAL</a></li>
<li><a href="society.html">SOCIETY</a></li>
<li><a href="about.html">ABOUT</a></li>
</ul>
</div>
CSS:
#topNavigation a:link {
font-family:"Quicksand-Regular", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
font-size:20px;
position:relative;
color:#00590d;
text-decoration:none;
transition:color .35s;
-webkit-transition:color .35s;
}
#topNavigation a:hover {
color:#7ead34;
}
#topNavigation a:before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #7ead34;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
}
#topNavigation a:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
#topNavigation a:visited {
color:#00590d;
text-decoration:none;
}
You can see what I'm talking about here: http://www.religionandnature.com/website2015/
The link for the Encyclopedia page is visited and the color doesn't transition. The other links aren't visited and work fine. Any suggestions appreciated.