Previous Message
Next Message

How to avoid hovering named anchors?

Sent by Adam Kuehn on 20 June 2005 17:05


At 2:33 PM -0400 6/19/05, Kelly Miller wrote:
>>>How can I avoid that modern browsers displays hover-color
>>>on named anchors?
>>>   
>>>
>>
>>I just avoid using named anchors (in favour of ids on arbitary, but
>>apropriate, elements), since I don't care much about Netscape 4.
>>
>>The other option is:
>>
>>a:link:hover, a:visited:hover {
>>
>>}
>>
>>
>Unfortunately, the problem with doing that is IE, which doesn't 
>understand :link:hover and :visited:hover.

True, but Uwe's solution was to use simply :hover.  IE doesn't 
understand that declaration, correctly, either.  In non-IE browsers, 
that causes the hover effect to apply to every single element on the 
page!  I'm sure that is not the intended effect.

David solution of avoiding named anchors is probably the way to go. 
If you must use a named anchor for version 4 compatibility, make it a 
completely empty element:  <a name="whatever"></a>.  With no content, 
no hover effects can apply.

HTH,

-- 

-Adam Kuehn
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: