...

View Full Version : Link Color Help



kamaro
01-22-2012, 06:22 AM
I got a menu list which is grey, and when you hover over it is green. I need it to stay green on whichever link is clicked. I tried changing color of a:selected and a:active but it didn't work. Thank you in advance



<ul id="menu-list">
<li><a href="" style="text-decoration: none">News</a></li>
<li><a href="" style="text-decoration: none">About Us</a></li>
<li><a href="" style="text-decoration: none">Gallery</a></li>
<li><a href="" style="text-decoration: none">Affiliates</a></li>
<li><a href="" style="text-decoration: none">Biography</a></li>
<li><a href="" style="text-decoration: none">Contact</a></li>
</ul>




#menu-list {
padding:0;
margin:0;

}
#menu-list li {
list-style-type:none;
margin-bottom: 7px;
}

#menu-list a:link, #menu-list a:visited, #menu-list a:active{
color: #5e5e5e;
}

#menu-list a:hover, #menu-list a.active, #menu-list a.selected{
color: #07CB25;
}

Excavator
01-22-2012, 06:54 AM
Hello kamaro,
There's no such thing as a:selected. Your CSS has an a.selected which would style an anchor with a class="selected", that might work for you. You would need to goto each page and put the class on the correct anchor for that to work.

Here is another method - http://nopeople.com/CSS%20tips/h_ul_menu-with_images/index.html

Faimos
01-22-2012, 09:38 PM
You can give it this effect by making it green on a:visited, but the link will not change back when another link is clicked.

There is no CSS property for this.

I would recommend looking into Javascript.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum