Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2011
    Posts
    28
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Question Hover Effect on Child Links in Drop Down Menu

    Hello everyone,

    I'm working on tidying up my drop down menu on my home page. The child links have a problem in that they are highlighted and given a hover effect when the user's mouse becomes level with the anchor tag on the drop down menu. There is something incorrect with the way I have targeted it in my dropdownmenus.css file.

    Code:
    #bMenu li:hover li a, #bMenu li:focus li a, #bMenu li:active li a{
    color:#0C0;
    text-shadow:1px 1px 1px #000;
    filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=1, OffY=1, Color=#000000);
    text-decoration:underline;
    background:none;
    filter:none;
    border:none;
    font-size:12px;
    display:inline;
    }
    
    #bMenu div a:hover,
    /*#bMenu div li:hover a, */
    #bMenu div a:focus,
    /*#bMenu div li:focus a,*/
    #bMenu div a:active
    /*#bMenu div li:active a */{
    color:#0F0;
    background:none;
    filter:none;
    border:none;
    text-decoration:none;
    }
    You can see what's happening for yourself at atlantareviewgroup.com. Check the bottom drop down menu to see how the above code does not achieve a hover effect at all.

  • #2
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    so you want them not to highlight like the nav at the top? as of now, they are not.

    take a look at your code:
    if you want all that code crossed out to overwrite the other, you have to stick a !important at the end. "#bMenu li:hover li a" has priority over "#bMenu div a:hover"

    Code:
    #bMenu div a:hover,
    /*#bMenu div li:hover a, */
    #bMenu div a:focus,
    /*#bMenu div li:focus a,*/
    #bMenu div a:active
    /*#bMenu div li:active a */{
       color:#0F0 !important;
       background:none !important;
       filter:none !important;
       border:none !important;
       text-decoration:none !important;
    }
    Last edited by Sammy12; 11-09-2011 at 05:00 AM.


  •  

    Tags for this Thread

    Posting Permissions

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