[Resolved] Coloring one of the menu options

Home Forums Support [Resolved] Coloring one of the menu options

Home Forums Support Coloring one of the menu options

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #690172
    Steve

    Hey guys,

    I have GeneratePress Premium and I’m wondering if I can customize one of the menu options by putting a border around it or coloring it a different color, like the “Donate” menu option on this website: https://dashdelivers.org/ (This website came from https://generatepressgallery.com) If so, where do I go to change its color?

    thanks so much!

    #690234
    David
    Staff
    Customer Support

    Hi there,

    this article explains how:

    https://docs.generatepress.com/article/adding-buttons-navigation/

    If you get stuck styling the button then let us know πŸ™‚

    #691082
    Steve

    Thanks David! For Step #2 (Add the CSS), can you let me know where I go to add the CSS in?

    Also, I assume that “.main-navigation .main-nav ul li.[This is where you enter in your Custom Class name] a {” Please correct me if I’m wrong.

    thanks again!

    #691083
    Leo
    Staff
    Customer Support

    One of these methods here: https://docs.generatepress.com/article/adding-css/

    and Yes πŸ™‚

    #691087
    Steve

    Thanks Leo! Do you recommend “Simple CSS” or “Additional CSS”? Sorry but I’m new to coding πŸ™‚

    #691089
    Leo
    Staff
    Customer Support

    Try Additional CSS first πŸ™‚

    #691091
    Steve

    Awesome, thanks!

    #691093
    Steve

    Okay I’ve tried the Additional CSS and it works great. Quick question, is there a way to set the hover color for the button? Also, how to make the button appear on tablet/phone navigation menu as well?

    thanks again!

    #691160
    Leo
    Staff
    Customer Support

    You can do this for the hover color:

    @media (min-width:769px) {
        .main-navigation .main-nav ul li.nav-button a:hover {
            background-color: #ffffff;
            border: 2px solid #000000;
            color: #000000;
        }
    }

    Mobile will be a bit tricky. Can you link me to the site in question?

    #691163
    Steve

    Thanks Leo! I put the code in and the hovering works, but the button’s background becomes transparent when I hover over it, when it should be solid. Is there a way to fix this?

    #691167
    Leo
    Staff
    Customer Support

    Edit the hover CSS to this:

    @media (min-width: 769px) {
        .main-navigation .main-nav ul li.menu-button a:hover {
            background-color: #574521 !important;
            border: 2px solid #574521;
            color: #ffffff;
        }
    }

    How would you want the button to show up?

    You can make it show up by removing the @media (min-width: 769px) { } of CSS.

    #691169
    Steve

    Thanks Leo! I tried both suggestions and it worked great. Final question, on tablet and mobile, is there a way to limit the button color to cover just the length of the text (Just over the word “Contact”). If no then no worries, it’s fine the way it is. Thanks again!

    #691344
    David
    Staff
    Customer Support

    Hi there,

    you can add a display: inline-block; property to your navigation button CSS. The downside of this is that only the ‘button’ is clickable as opposed to the entire row.

    #692095
    Steve

    Awesome, thanks David!

    #692158
    David
    Staff
    Customer Support

    You’re welcome

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