Center align horizontal navigation

Forums › Forums › Search & Filter Pro › Center align horizontal navigation

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #222015

    Hey!

    How to center align the search form? I want it to be aligned right over the display output. But for some reasons everything aligns to the left! Tried basically everything to correct this. Same applies with the responsive layout – it just looks weird! Would be nice to align everything under each other with full auto width.

    The link is: http://www.erlinghoi-nielsen.dk/beta2020/find-bil/

    Trevor
    #222073

    I think this simple CSS should do it:

    #search-filter-form-587 {
      display: table;
      margin: 0 auto;
    }
    Anonymous
    #222127

    Yeah that worked centering the navigation! It didn’t help the responsiveness though! :'( I would like all the elements to align nicely underneath each other with full with, if you know what I mean? 🙂

    Anonymous
    #222129

    And thanks btw! 😉

    Trevor
    #222147

    Responsiveness is handled with CSS media queries.

    Do you have a breakpoint for mobile? Let’s say mobile is 600px and less, and desktop is 601px and more, then the code I gave you would become:

    @media only screen and (min-width: 601px) {
      #search-filter-form-587 {
        display: table;
        margin: 0 auto;
      }
    }

    Similarly, inside that you could put the code you already used to make the form horizontal.

    Then, by default, on mobile the form would become vertical and not centered.

Viewing 5 posts – 1 through 5 (of 5 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.