Mobile Width Css Help

Forums › Forums › Search & Filter Pro › Mobile Width Css Help

Tagged: 

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

    Hello,

    I have some css knowledge and have tried to put together css for reducing the size of the filters widget on mobile. I am using the search and filter shortcode on an elementor shop page. On mobile, I want to reduce the size of the filters and move them to the left of the products. Here is the URL you can check out on a mobile device: https://elizabethg11.sg-host.com/southern-wines/all-wines/

    Below is the css snippet I am trying to implement. Is there something missing from it? I’ve tried both min-width & right-padding but neither worked.

    Thank you!

    @media (min-width: 600px) {
    .searchandfilter[data-sf-form-id=“6646”]
    min-width: 50px;
    }

    Trevor
    #255348

    That CSS looks wrong. The first bit of code you appear to need is this:

    .searchandfilter[data-sf-form-id="6646"] ul {
      padding-left: 0;
    }

    The CSS you gave me should surely be max-width, not min-width, if it is for mobile only?

    And it is missing a pair of curly braces:

    @media (min-width: 600px) {
      .searchandfilter[data-sf-form-id="6646"] {
        min-width: 50px;
      }
    }

    Can you show me one or more annotated screenshot(s) of the design change(s) you want? If you can do that, you would need to upload the screenshot image(s) to a file sharing site (like the WordPress Cloudup site) and share the link with me?

    Anonymous
    #255386
    This reply has been marked as private.
    Trevor
    #255492

    Try adding this additional CSS:

    .searchandfilter[data-sf-form-id="6646"] select.sf-input-select {
        min-width: auto;
    }
    .searchandfilter[data-sf-form-id="6646"] li.sf-field-search input,
    .searchandfilter[data-sf-form-id="6646"] li.sf-field-search label,
    .searchandfilter[data-sf-form-id="6646"] .select2-container {
      max-width: 100%;
    }
    Anonymous
    #255597

    Thank you that works!! You can close this thread 🙂

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.