I do realise that what i am trying to achieve is partly covered in the 'topic' here: How to change link colour of the current page
I have read through it thoroughly and it has solved part of my problem but not completely,
Background info on my question - I have a navigation bar created using an unordered list and I have both the 'hover' state and 'active' state set with different background colours.
On 'hover' my link text changes colour from grey to white and a background colour of grey appears to contrast the text.
On 'active' the background colour turns red with the text staying white.
What I would like to be able to do is have the current pages navigation link keep the 'active' states colour scheme.
From the research i have already done I have been able to apply a class to just the 'current' link on each html page, doing this has solved part of my problem, giving my current pages link a red background, in the class I have defined both the background colour and text colour, but only the background colour works and the text colour stays it's original grey colour.
So my class isn't able to over-ride the previously defined text colour that it is (when not hovering or active)
I have also tried using a span tag on the current link to over-ride, but this goes to far and completely over rides my layout scheme, which is very reliant on the ids i have applied to both the 'ul' and 'li' tags within my navigation div.
If someone has a practical solution to this i would be very grateful, i am open to using javascript if that will make things easier. as i have scripting in my site already
Here is snippet my html and css properties: All i need to be able to do is have that text stay white for current page.
Ben loader
#TopNav{
height: 100px;
width: 640px;
float: right;
background-color: #FFF;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 16px;
font-weight: bold;
}
#TopNav ul{
float: right;
margin: 0px;
padding: 0px;
position: relative;
list-style-type: none;
}
#TopNav ul li:first-child{
float: left;
border-left-style: none;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
}
#TopNav ul li{
display: inline-block;
float: left;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #EEE;
margin-top: 30px;
margin-bottom: 30px;
line-height: 20px;
}
#TopNav ul li a{
text-decoration: none;
color: #676767;
padding: 10px;
display: block;
}
#TopNav ul li a:hover{
background-color: #444444;
color: #FFF;
}
#TopNav ul li a:active{
background-color: #FF605A;
}
a.currentlink {
background-color: #FF605A;
color: #FFF;
}
<nav id="TopNav">
<ul>
<li><a class="currentlink" href="Home.html">Home</a></li><li>
<a href="About.html">About</a></li><li>
<a href="Services.html">Services</a></li><li>
<a href="Music.html">Music</a></li><li>
<a href="Videos.html">Videos</a></li><li>
<a href="Resources.html">Resources</a></li><li>
<a href="Contact.html">Contact</a></li>
</ul><!--end of ul -->
</nav><!--end of TopNav-->