[Support request] Right menu element

Home Forums Support [Support request] Right menu element

Home Forums Support Right menu element

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1529486
    Clevelus

    How do I now make the one menu item on the right?
    For example, place a phone number to a magnifying glass (search button)?

    It used to be possible with such a class, but now it doesn’t work.
    nav li.menu-right (worked on older versions generatepress) or
    .menu-right {
    float: right;
    text-align: right;
    z-index: 21;
    }

    Using the class menu-item-float-right from the help from here doesn’t help either.
    https://docs.generatepress.com/article/adding-icons-to-menu-items/?ref=1661

    #1529693
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    @media(min-width: 1024px) {
        .main-navigation .inside-navigation .main-nav {
            flex: 1;
        }
        .main-navigation li:last-child {
            margin-left: auto;
        }
    }
    #1531498
    Clevelus

    It works, thanks.
    But there is no way to control which menu item (there can be more than one) should be on the right (my code below works too, but lacks understanding of how the new theme works).
    Well, this is not in the documentation, which is very bad (with the transition to the new version of the GP, a lot has changed)

    @media(min-width: 1024px) {
        .main-navigation .inside-navigation .main-nav {
            flex: 1;
        }
        /*.main-navigation li:last-child {
            margin-left: auto;
        }*/
    	
    	li.menu-right {
    		margin-left: auto;
    	}
    }
    #1531564
    Leo
    Staff
    Customer Support

    I believe this hook would help:
    https://docs.generatepress.com/article/generate_menu_bar_items/

    The video shows some examples as well.

    You can control the order by using the priority field.

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