[Resolved] Search bar moves Logo

Home Forums Support [Resolved] Search bar moves Logo

Home Forums Support Search bar moves Logo

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1268154
    Santy

    I installed the search bar and it displaces the logo on the primary navigation bar. I am trying to move the search bar to the middle of the primary navigation between the logo and the shopping cart.

    I installed this hook:

    <form role=”search” method=”get” class=”search-form” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>
    <label>
    <span class=”screen-reader-text”>Search for:</span>
    <input type=”search” class=”search-field” placeholder=”Search…” value=”<?php echo get_search_query(); ?>” name=”s” />
    </label>
    <input type=”submit” class=”search-submit” value=”&#xf002″ />
    </form>

    and then set the css for the icon:

    .main-navigation .search-submit {
    font-family: GeneratePress;
    }

    which created the search bar but puts it next to the logo on the left side of the primary navigation bar and to the left side of the logo.

    The header is being used as the Primary navigation.
    How do I get the logo to remain in it’s default position and move the search bar to the middle?

    https://rivervalleyhvac.com/wp-content/uploads/hvac-screenshot.png

    #1268482
    David
    Staff
    Customer Support

    Hi there,

    can you temporarily remove your Coming Soon so i can take a look at the CSS required.

    #1269540
    Santy

    Hello the site is now live.

    #1269547
    Leo
    Staff
    Customer Support

    Give this CSS a shot:

    .navigation-branding {
        order: -1;
        margin-right 0;
    }
    .main-navigation .search-form {
        margin-left: auto;
        margin-right: auto;
    }
    #1269553
    Santy

    Thanks that worked great now I just need to add some css to move the search bar to the middle.

    #1269560
    Santy

    Thanks for the help. Definitely worth buying GP even if it’s just for the great support that’s provided by your team.

    #1269568
    Leo
    Staff
    Customer Support
    #1269569
    Leo
    Staff
    Customer Support

    Looks like you’ve found a solution 🙂

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