[Resolved] Changing hover and active effect on main menu

Home Forums Support [Resolved] Changing hover and active effect on main menu

Home Forums Support Changing hover and active effect on main menu

  • This topic has 7 replies, 3 voices, and was last updated 1 year ago by Leo.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #541703
    Pedro

    I added this to my menu:

    .menu-item {
      transition: box-shadow 0.6s linear;
    }
    
    .menu-item:hover {
    	box-shadow: 0px 1.5px 0px 0px #000;
    }

    So it displays a thin line under the menu item I’m hovering over
    and it’s working fine but I can’t manage to make it stay fixed on the active menu item, I’ve tried with:

    .menu-item:active {
    	box-shadow: 0px 1.5px 0px 0px #000;
    }

    with no success, any help would be appreciated.

    Thanks

    GeneratePress 2.0.2
    GP Premium 1.6.2
    #542075
    Leo
    Staff
    Customer Support

    Hi there,

    I’m not seeing any CSS being added.

    Can you try these selector instead?
    .main-navigation .main-nav > ul > li > a
    .main-navigation .main-nav > ul > li > a:hover
    .main-navigation .main-nav > ul > li[class*="current-menu-"] > a

    Let me know.

    #542094
    Pedro

    Thank you very much Leo, that did the trick.

    sorry about the CSS, I was trying different things ๐Ÿ™‚

    just one more thing though, is there any easy way to customize the search bar?, because right now I can’t use it and I guess it is due to my color configuration.

    #542251
    Leo
    Staff
    Customer Support

    No problem!

    Can you open a new topic for the separate question?

    Thanks!

    #542683
    Pedro

    Of course, thank you again

    #543028
    Leo
    Staff
    Customer Support
    #1259356
    Annick

    This is the answer I’ve been looking for for ages (to be more precise: the third selector). Thanks!

    #1259813
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.