Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighting menu links

Status
Not open for further replies.

webmonkey8

Programmer
Jun 11, 2003
13
CA
Hello, I have a menu on a webpage I want highlighted when a user clicks on it (it's to let the user know that he/she has selected this link. The links I have on this menu already have a rollover highlighted effect, however it doesn't stay when clicked. Can you help me? Thanks!
 
_If_ your menu is text based, and you don't mind having all your links displayed in the same way, try sticking this in between your <head> tags:

<style type=text/css>

A:link
{
color: [COLOR=of a non-visted link];
}

A:hover
{
color: [COLOR=of the link when hovered over];
}

A:visited
{
color: [COLOR=of the link after visited];
}

A:active
{
color: [COLOR=of the link when clicked];
}

</style>

There are ways of handling links so that not all links on your page are affected, but that question should more than likely be asked in the Javascript forum, as you start dealing with onMouseOver events and such.

- Hope that helps :)

-----------------------------------------------
&quot;The night sky over the planet Krikkit is the least interesting sight in the entire universe.&quot;
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top