CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011
    Posts
    41

    [RESOLVED] CSS hover effect question

    Is it possible to exclude just a single link for a CSS hover effect?

  2. #2
    Join Date
    May 2011
    Posts
    41

    Re: CSS hover effect question

    I came up with an easier fix. If anyone wants it here is an answer to the question I posed.


    If you put hover on anchor tags, like a and a:hover styles, then you may want for some anchor tags to exclude the hover, you can add .nohover class and apply the same style as in the normal state.

    Example

    Code:
    01
    <style>
    02
    a { color:red; }
    03
    a:hover { color: blue; }
    04
    a:hover.nohover { color: red; }
    05
    </style>
    06
     
    07
     
    08
    <a href="#">Hajan</a>
    09
     
    10
    <a href="#" class="nohover">Hajan - no hover</a>

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured