[Resolved] Centering Logo Menu – Desktop

Home Forums Support [Resolved] Centering Logo Menu – Desktop

Home Forums Support Centering Logo Menu – Desktop

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1607580
    fabiosilva

    Hi,

    Firstly, Happy New Year! πŸ™‚

    I’m trying to create a menu like this to work only on desktop:. For mobile, I will prefer de Generatepress standards:
    https://i.ibb.co/7NNFJb7/MENU.jpg

    I tried to follow this tutorial, setp by step:
    https://docs.generatepress.com/article/centering-logo-navigation/

    But, the result has:
    https://i.ibb.co/z6L02Jk/real.jpg

    Any simple way to make this?
    Basically, I want to place the logo in the center, and center the menus in the respective columns.
    The cart could be aligned to the right (by default)

    Thank you very much for your help

    #1607733
    David
    Staff
    Customer Support

    Hi there,

    Couple of things:

    1. Add this CSS to fix the menu spacing:

    .main-nav {
        flex: 1;
    }

    2. Edit this part of the center logo CSS, and include the extra line i have commented below:

    .site-branding, .site-logo {
        position: absolute;
        left: 50%;
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
        z-index: 200;
        top: 0; /* Add this line */
    }

    This will fix the logo issue on the Mobile Header when the nav is opened

    #1607773
    fabiosilva

    Thank you, David.

    I think it solved.
    How can I make the logo not ignore the top and bottom header paddings?

    #1607868
    David
    Staff
    Customer Support

    You would need to adjust the top: 0; value e.g top: 10px; will move it 10px down the page.

    #1622696
    fabiosilva

    Hi,

    This solution for centered logo, on desktop, not work’s very well with fixed navigation.

    Any way to make fixed navitagion ignore centered logo?

    Thank you.

    #1622900
    Leo
    Staff
    Customer Support

    We’ve actually updated the method recently.

    Can you try the new method here?
    https://docs.generatepress.com/article/centering-logo-navigation/

    #1623044
    fabiosilva

    Hi, Leo. Yes, work better.
    But my problem keeps.

    So, now, fixed menu works better, but the transition between fixed and static menu, is not fine. :-S

    Can you check my loom video?

    Thank you, Leo.

    #1623811
    David
    Staff
    Customer Support

    Hi there,

    theres no simple fix for that ( Although i rather like the effect πŸ™‚ ) when using the Site Header and the Sticky Navigation. Instead you would want to use the Navigation as Header Option in Customizer > Layout > Header, as then there will be only one logo to display.

    #1623827
    fabiosilva

    Yes, you are right! πŸ™‚ Perhaps it is not so problematic.

    What I don’t like is the bottom fixed menu shadow, which is not doing the pass very well (between fixed menu and header).

    #1623944
    Ying
    Staff
    Customer Support

    Hi Fabiosilva,

    Try this CSS to remove the box shadow when scrolling up:

    #sticky-navigation.sticky-nav-scrolling-up {
        box-shadow: none;
    }

    Let me know πŸ™‚

    #1623994
    fabiosilva

    Thank you, Ying! πŸ™‚

    #1624068
    Ying
    Staff
    Customer Support

    No problem πŸ™‚

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