[Resolved] Logo and menu float left problem

Home Forums Support [Resolved] Logo and menu float left problem

Home Forums Support Logo and menu float left problem

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #172381
    marcel

    Hey!
    I need my logo and floating menu on the left ..!

    ———————————————————————————–
    LOGO MENU ITEM | MENU ITEM | MENU ITEM
    ———————————————————————————-

    THANKS!

    #172400
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Have you tried setting your Navigation Position to “Float Right” in “Customize > Layout”?

    #172511
    marcel

    Hello, if I tried and it works. But it’s not what I need . Precise logo and then the next menu . If the menu and logo float left, no work fine.
    Now the code generated is this :

    first navigation and then logo

    <nav id=”site-navigation” class=”main-navigation” itemscope=”itemscope” itemtype=”http://schema.org/SiteNavigationElement”></nav&gt;

    If I could be like this:

    first logo and then navigation

    <nav id=”site-navigation” class=”main-navigation” itemscope=”itemscope” itemtype=”http://schema.org/SiteNavigationElement”></nav&gt;

    Thank you, your plugin is very useful. I hope to soon have new features that will buy

    #172512
    marcel

    first navigation and then logo

    <nav></nav>
    <div class="logo"></div>

    If I could be like this:
    first logo and then navigation

    <div class="logo"></div>
    <nav></nav>
    #172534
    Tom
    Lead Developer
    Lead Developer

    Hm, I’m not too sure what you mean. Do you have an example of what you’re trying to do?

    #172542
    marcel
    #172545
    Tom
    Lead Developer
    Lead Developer

    Ahh, so you don’t want the menu all the way on the right?

    #172546
    marcel

    Sure, why not serve me right, should float to the left next to the logo .I have to leave it like the image I sent

    #172554
    Tom
    Lead Developer
    Lead Developer

    Gotcha, this should work.

    Add this PHP:

    add_action( 'after_setup_theme','generate_move_navigation' );
    function generate_move_navigation()
    {
        remove_action( 'generate_before_header_content', 'generate_add_navigation_float_right', 5 );
        add_action( 'generate_after_header_content', 'generate_add_navigation_float_right', 5 );
    }

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

    Then add this CSS:

    .nav-float-right .main-navigation {
        float: none;
        display: inline-block;
    }
    
    .site-branding,
    .site-logo {
        display: inline-block;
    }

    Adding CSS: https://generatepress.com/knowledgebase/adding-css/

    #172911
    marcel

    Good ! work ! only one change for me :

    
    .site-branding,
    .site-logo {
        display: inline-table;
    }

    Thanks man!

    Marcel

    #172921
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #180229
    Joona

    Thanks, this was helpful for me too.

    #180290
    Tom
    Lead Developer
    Lead Developer

    Great! πŸ™‚

    #482813
    Stew

    Hi, I’m attempting the same thing but it’s not working. I’ve cleared cache and hard reloaded the page. I’m using a secondary menu as well as a primary menu. When I put in the PHP and CSS using a child theme my logo doesn’t go to the left of the primary menu on the left.

    As it currently sits my logo is in the center with primary menu floated left, secondary menu floated right. I attempt to set the primary menu to float right and the menu just goes under the secondary menu. I really want my logo to the left with the primary menu next to it with my secondary menu floated right.

    #482992
    Leo
    Staff
    Customer Support

    Hi there,

    Can you provide a link to your site?

    You can open a new topic and use the private URL field if it helps.

    Just link us back here πŸ™‚

    Thanks!

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