Results 1 to 2 of 2

Thread: CSS Hover problem

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Hover problem

    This is probably a really easy fix, but I just can't seem to get it to work. I have set the link color to change on hover but it just isn't working. I added some drop down menu code to some of the links as well and on those the hover change is working. Not sure what I did wrong.

    http://www.centaurusinv.com/indexNew.html

    A:link { font-size: 11px;
    font-family: Arial, Helvetica, Sans-serif;
    color: #797979;
    text-decoration: none;
    }

    A:hover { font-size: 11px;
    font-family: Arial, Helvetica, Sans-serif;
    color: #B20838;
    text-decoration: none;
    }

    A:visited { font-size: 11px;
    font-family: Arial, Helvetica, Sans-serif;
    color: #797979;
    text-decoration: none;
    }


    #dropmenudiv{
    position:absolute;
    border:1px solid white;
    border-bottom-width: 0;
    font:normal 12px Arial;
    line-height:18px;
    z-index:100;
    }

    #dropmenudiv a{
    width: 100%;
    display: block;
    text-indent: 3px;
    border-bottom: 1px solid white;
    padding: 1px 0;
    text-decoration: none;

    }

    #dropmenudiv a:hover{ /*hover background color*/
    background-color: E5E5E5;
    color: B20838;
    }

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The :hover pseudo class must follow the :visited and :active pseudo classes (when either or both are used) in the stylesheet. Otherwise, one of those (:visited or :active) will take precedence.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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