[Resolved] Nav Menu Float Right – but align centre

Home Forums Support [Resolved] Nav Menu Float Right – but align centre

Home Forums Support Nav Menu Float Right – but align centre

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #2298009
    Stephen

    That works really well thanks.

    – If the woo cart is added to nav menu using the Customising- Layout option then it has a drop down ‘mini cart sub menu’ option.

    – Can I make my shortcode header cart-icon have the woo cart drop down sub menu ?

    I’ve added the cart with shortcode in a hook element with the shortcode from code snippet.

    add_shortcode( ‘cart_icon’, function() {
    ob_start();
    // Start your PHP below

    echo generatepress_wc_cart_link();

    // End your PHP above
    return ob_get_clean();
    } );

    #2298013
    David
    Staff
    Customer Support

    Whats the reason for the shortcode method ? Why not use the cart menu from the Customizer ?

    #2298049
    Stephen

    Hi, its just to keep it always on the right side of the header

    #2298256
    David
    Staff
    Customer Support

    Remove the shortcode method and enable the one in the Customizer, and we’ll figure out how to position it and keep your megamenus the way you want it.

    #2298276
    Stephen

    No problem, I’ve disabled the cart hook and activated cart in nav menu and the cart dropdown works well.

    Previously the nav menu floated in the middle of header between logo and cart, now nav menu is on the right with cart inline.

    – How can I get the cart icon on the right side with rest of nav menu floating between cart and header and also have the cart not move to the bottom line on narrower screen ?

    Thank you
    Stephen

    #2298709
    David
    Staff
    Customer Support

    Add this CSS:

    @media(min-width: 1024px) {
        .nav-float-right #site-navigation {
            width: 100%;
        }
        .main-navigation .main-nav>ul {
            position: relative;
        }
        .main-nav {
            margin: auto;
        }
    }

    You may want to consider increasing the Mobile Menu Breakpoint to stop the menu getting squished on sub 1024px wide screens.

    #2298713
    Stephen

    Fantastic – thank you !

    #2298802
    David
    Staff
    Customer Support

    You’re welcome

Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.