PDA

View Full Version : exclude <a> from hover



b8man
02 Aug 2010, 05:52 AM
Hi!
I got a div container (with id for a navmenu) with several links that need to hover, except one link. I'm using the a:hover css command but can't figure out how to make this one linke not to react on a hover. Is there sth. to exclude or "no-hover" a single link? (I'm trying to solve this without packing this one special link in a separate div...)

greetz
b8man

Wickham
02 Aug 2010, 06:26 AM
Someone else asked almost the same question here:-
http://bytes.com/topic/html-css/answers/98865-dynamically-disable-links-css
It says:-
Sort of.
a.no-hover:link, a.no-hover:visited, a.no-hover:hover {color: black; background: white;
text-decoration: none; cursor: default;}

Conceals it visually, but anyone tabbing through the links will still
see a focus rectangle around it (or their browser's equivalent).

I added the class no-hover

In your links add the class


<a class="no-hover" href="#"></a>


Change colors to suit your page.

The # in the anchor tag means that the browser will just stay on the same page.