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

prob with active link on rollover menu

Status
Not open for further replies.

vero66

Programmer
May 16, 2005
5
GB
hi,

I've got a rollover menu with css file, it's working fine expect that i have to click twice on the active link for the different color to stay?

Code:
table.menu a { 
width:125px; 
border:1px solid #333333; 
display: block; 
text-decoration: none;
} 
div.menu a:link {
color: #9933ff; 
background: #ccccff; 
}
div.menu a:visited {
color: #9933ff; 
background: #ccccff; 
}
div.menu a:hover {
color: #000000;
background: #cc99ff; 
border:1px solid #000000; 
}
div.menu a:active { 
color: #9933ff;
background: #cc99ff; 
}
div.menu ( 
position:absolute;
top:0; 
left:0;
)

any ideas where i go wrong?

thanks
v
 
In Firefox and other standards-compliant browsers, [tt]:active[/tt] only applies to a link while you're actually clicking on it. In IE it applies when the link has the focus - typically when you're tabbing through links using the keyboard. It doesn't mean "a link to the currently active page".

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
thanks Chris but do you have a tip how can i have the link in a different color once in the page clicked like the forum button on your page?
that's not the vlink, is it?
 
Forum button? On my site I hard-code an id to indicate the current menu option on each page:
Code:
<li [b]id="current"[/b]>
  <a href="/">Home</a>
</li>
<li>
  <a href="/about.shtml">About</a>
</li>
I can then apply styles to that. I think that's the easiest way to do it.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top