Results 1 to 2 of 2

Thread: exclude <a> from hover

  1. #1
    Join Date
    Jun 2010
    Posts
    7

    Question exclude <a> from hover

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Someone else asked almost the same question here:-
    http://bytes.com/topic/html-css/answ...able-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
    Code:
    <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.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •