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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active link question

Status
Not open for further replies.

cactus1000

Programmer
Aug 31, 2001
149
US
Using CSS, I have set a certain color for active links. Is there a way to set the state of a link to active using the OnLoad function?

In other words, I have a left-frame navigation bar with a list of links. I want tht link to the homepage to be in the active state (with the proper color) as soon as the homepage loads. (so the user will know what page he/she is currently looking at).

Is this possible?
 
Couldn't you just define a separate style "class" for those links pn you homepage that set the color for link and visited to the same value. Something like this:

.hplink a:link {color: #BBC;}
.hplink a:visited {color: #BBC;}
.hplink a:link:hover {color: #FF0;}
.hplink a:visited:hover {color: #CC0;}


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top