Okay
  Public Ticket #717393
Change color of menu hover on last-child with CSS
Closed

Comments

  • John started the conversation

    We've added 2 custom menu link at the end of our main nav... phone and free quote button.

    All of our CSS works fine but we can't get the hover text of the link to change to the correct color. We want it to be #FFF but it stays the default blue.

    Here is our css:

    body header#top nav > ul > li:last-child > a{
        box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        -moz-box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        -webkit-box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        -o-box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        transition: opacity 0.6s linear;
        -moz-transition: opacity 0.6s linear;
        -webkit-transition: opacity 0.6s linear;
        -o-transition: opacity 0.6s linear;
    background-color: #00AE53;
    font-family: 'Open Sans';
        font-weight: 300;
    color:#EFEFEF!important;
    padding: 10px!important;
    border-radius: 4px 4px 4px 4px;
    text-shadow: 0px 1px 1px #999999;
    
    }
    
    
    
    body header#top nav > ul > li:last-child > a:hover {
        box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        -moz-box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        -webkit-box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        -o-box-shadow: 0 -3px rgba(0, 0, 0, 0.1) inset;
        transition: opacity 0.6s linear;
        -moz-transition: opacity 0.6s linear;
        -webkit-transition: opacity 0.6s linear;
        -o-transition: opacity 0.6s linear;
    background-color: #00AE53;
    font-family: 'Open Sans';
        font-weight: 300;
    color:#FFFFFF!important;
    padding: 10px!important;
    border-radius: 4px 4px 4px 4px;
    text-shadow: 0px 1px 1px #999999;
    
    }
    


  •  8,939
    Tahir replied
    Hey, Please provide the page url so that i can write up the custom css for whats possible. Thanks


    ThemeNectar Support Team 

  • John replied

    https://carshield.com/


    Its the phone # and Get Free Quote button in the main nav. We want the hover text to be #FFF (white) but it still makes it blue.


    Thx.

  •  8,939
    Tahir replied

    Hey ,
    Add this into the Custom CSS box located in your Salient Options panel (Make Sure there are no red cross in the Box) :

    #header-outer:not([data-lhe="animated_underline"]) header#top nav ul li.menu-item-6916 a:hover, #header-outer:not([data-lhe="animated_underline"]) header#top nav ul li.menu-item-6686 a:hover {
        color: #fff !important;
    }
    

    Best.


    ThemeNectar Support Team 

  • John replied

    Works... good only issue is on the active (current_page_item) color is blue when we want it white.

    We tried this but it doesnt work:


    #header-outer:not([data-lhe="animated_underline"]) header#top nav ul li.menu-item-8760 a:active {
        color: #EFEFEF !important;
    } #header-outer:not([data-lhe="animated_underline"]) header#top nav ul li.menu-item-8760 a:focus {
        color: #EFEFEF !important;
    }



  •  8,939
    Tahir replied

    Hey Again,
    Add this into the Custom CSS box located in your Salient Options panel (Make Sure there are no red cross in the Box) :

    body #header-outer:not([data-lhe="animated_underline"]) header#top nav .sf-menu > li.current-menu-item > a {
        color: #AC1010 !important;
    }
    

    Best.


    ThemeNectar Support Team