Hello,
I did throuhg CSS a navigation menu. It seems fine; as you can see I set the 'current' page as 'active'. When I click on a link (button) the background changes colour. The problem is the the background of the 'activeLink' remains 'active'; How can I avoid this last? Can I do it by means of CSS or maybe do I need JS to accomplish this?
Thanks in advance
I did throuhg CSS a navigation menu. It seems fine; as you can see I set the 'current' page as 'active'. When I click on a link (button) the background changes colour. The problem is the the background of the 'activeLink' remains 'active'; How can I avoid this last? Can I do it by means of CSS or maybe do I need JS to accomplish this?
Thanks in advance
Code:
div#menu a:link, div#menu a:visited {
background-color: #485e49;
color: #a2b3a1;
}
div#menu a:hover, div#menu a:focus, div#menu a:active {
color: White;
text-decoration: none;
background-color: #a2b3a1;
}
div#menu a#activelink {
color: White;
background-color: #a2b3a1;
text-decoration: none
}
<div id="menu">
<a id="activelink" href="#">HOME</a>
<a href="#">CUSTOMERS</a>
<a href="#">NEWS</a>
<a href="#">ABOUT</a>
</div>
Comment