[Support request] Targeting a Single Navigation Menu Item to Create a Button

Home Forums Support [Support request] Targeting a Single Navigation Menu Item to Create a Button

Home Forums Support Targeting a Single Navigation Menu Item to Create a Button

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #268508
    Max

    Hi Tom,

    So I am trying to make one of the nav links a button.

    I added this code to the Navigation label: <button id=”nav-button”>BOOK A SESSION</button>

    Then in customize –> additional CSS –> I added this code:

    .nav-button {
    background-color: #90c2b9;
    color: white;
    }

    I can’t seem to target the specific nav item. And should I be doing this in a child theme or is the additional CSS an ok place to format.

    Thanks!

    #268510
    Leo
    Staff
    Customer Support

    Hi Max,

    Try this:

    #nav-button {
        background-color: #90c2b9;
        color: white;
    }

    Let me know.

    #268519
    Leo
    Staff
    Customer Support

    Or try adding buttons using the instruction below:
    https://docs.generatepress.com/article/adding-buttons/

    #268535
    Tom
    Lead Developer
    Lead Developer
    #268542
    Max

    .main-navigation .nav-button a {
    background-color: #90c2b9;
    border-color: #90c2b9;
    color: #000000;

    }

    I have this code added to the additional CSS and now the nav link won’t show up at all lol.

    I took out the html button tag from the navigation menu as well. Should I put that back in there?

    http://christinahouserphoto.flywheelsites.com/

    #268555
    Leo
    Staff
    Customer Support

    Hi Max,

    Your site is password protected.

    Did you add the custom CSS class nav-button as instructed here?

    #268557
    Max

    yeah, I added the custom class CSS as:

    nav-button

    Then pasted this code into the additional CSS in the customizer:

    .main-navigation .nav-button a {
    background-color: #90c2b9;
    border-color: #90c2b9;
    color: #000000;

    }

    Nothing. No button anymore.

    I can post the username and password to the site so you can see if you’d like.

    #268567
    Leo
    Staff
    Customer Support

    Does your navigation label/link text show up?

    #268570
    Max

    No, it doesn’t show up. I got nothing.

    The button will show up if I put the html <button>Book a Session</button> in the navigation label. But then I can’t target that element to customize it.

    #268573
    Leo
    Staff
    Customer Support

    That’s weird not even the navigation links are showing up.

    Just want to make sure that you filled the box like this: https://s27.postimg.org/lh5vjtyvn/book.jpg

    Are other menu items in the same navigation showing up?

    Probably wouldn’t hurt to see the site. I’ll delete the login/password as soon as I see it πŸ™‚

    #268577
    Max

    Yeah I filled it out right, strange. Ill take a screen shot after I send the username and password for the site.

    http://christinahouserphoto.flywheelsites.com/

    #268582
    Max

    Even when i added some code to the addtional CSS to make the letter spacing larger, that didnt work either:

    .main-navigation a {
    letter-spacing: 3px;
    }

    I dont know whats up lol.

    #268587
    Tom
    Lead Developer
    Lead Developer

    Would definitely help to be able to see the site πŸ™‚

    #268588
    Leo
    Staff
    Customer Support

    Tom I will send the login/password to you πŸ™‚

    #268589
    Tom
    Lead Developer
    Lead Developer

    Your current menu item color is set to white, so it’s white text on a white background.

    Customize > Colors > Primary Navigation.

    That will at least make it show up.

    I’m not seeing any CSS specific to the nav-button class.

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