[Resolved] menu button

Home Forums Support [Resolved] menu button

Home Forums Support menu button

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1549559
    Jose

    Hi, I have created a buttton in the menu, but when I am in the page of that button, it changes its color, how can i fix it?

    http://luisentr-cp505.wordpresstemporal.com/

    “REGALA SALUD”

    Regards,

    #1550079
    David
    Staff
    Customer Support

    Hi there,

    in your CSS change this:

    .main-navigation .main-nav ul li.nav-button a {
        background-color: #ff1e00;
        border: 2px solid #ff1e00;
        border-radius: 40px;
        color: #ffffff !important;
        line-height: 35px;
    }

    to:

    .main-navigation .main-nav ul li.nav-button a,
    .header-wrap #site-navigation:not(.toggled) .main-nav>ul>li.nav-button[class*="current-menu-"]>a {
        background-color: #ff1e00;
        border: 2px solid #ff1e00;
        border-radius: 40px;
        color: #ffffff !important;
        line-height: 35px;
    }
    #1551397
    Jose

    But with that code I hace the button effect in all the pages i am.

    #1551697
    David
    Staff
    Customer Support

    Edited the CSS above – try that

    #1552620
    Jose

    Okey, it is workin now. But when I hover over the button, backgroung anc color text are white, in my CSS I have it different, do you know what the problem can be?

    Regards,

    #1553071
    Tom
    Lead Developer
    Lead Developer

    Try adding this:

    .main-navigation .main-nav ul li.nav-button:hover a {
        color: #ff1e00 !important;
    }

    BTW – this method may be worth looking into when it comes to adding buttons to the navigation: https://docs.generatepress.com/article/generate_menu_bar_items/

    #1554423
    Jose

    Nothing…

    #1555260
    Leo
    Staff
    Customer Support

    I’m not seeing Tom’s CSS being added.

    When tested the code, it worked as expected:
    https://www.screencast.com/t/oQkbYjOG

    #1556785
    Jose

    Now it is working, but it is strange, I have to write the code twice…

    It is weird

    #1556997
    Leo
    Staff
    Customer Support

    You shouldn’t have to write the same code twice.

    Glad it’s working though.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.