[Support request] different colour underline in primary navigation

Home Forums Support different colour underline in primary navigation

  • This topic has 5 replies, 2 voices, and was last updated 1 year ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #991455
    Brian

    Hi,

    Sorry to bother you,

    I was wondering is it possible to have an animated underline in the primary nav, but when you hover over it, and when its active, it is a different colour?

    Thank You,

    Brian Thompson

    #991514
    David
    Staff
    Customer Support

    Hi there,

    is this the sort of thing you’re trying to achieve?

    https://docs.generatepress.com/article/adding-menu-hover-animation/

    Let me know and i can help with the current/active colors etc.

    #991525
    Brian

    Hi David,

    Yes, Thank you. Is there a possibility of li item specific colours for the different underlines? Or is that something that is can be added through the menu classes in the menus section?

    Kind Regards,

    Brian Thompson

    #991542
    David
    Staff
    Customer Support

    Adding classes to each of your menus would be simplest, eg. custom class: bt-blue then you would add this CSS:

    .main-navigation .menu > .menu-item.bt-blue > a::after {
        background-color: blue;
    }

    And if you wanted to style that item when its the current item you can use this selector:

    .main-navigation .menu > .menu-item.current-menu-item.bt-blue > a::after

    #991768
    Brian

    Hi David,

    Maybe I will stick to just the animated underline as it is! Thanks for that.

    Kind Regards,

    Brian Thompson

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