Support » Fixing WordPress » Products not lined up nicely in a gallery any more – why not?

  • HI

    I’e just uploaded an updated product CSV and now I notice my products are no longer lined up nicely next to each other like in a photo gallery. usually 3 products per row. Now, In some cases there is one product in a row, Sometimes 2 Sometimes the full row of 3. What is causing these spaces, please? It looks ugly.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Your template is outputting first and last classes within inappropriate elements, causing “line breaks” of a sort at the wrong places. This sort of thing is unnecessary with proper responsive design. The items should flow correctly depending upon their assigned widths which is determined by the screen width.

    While that is the root cause, preventing their output likely involves altering templates, which makes site maintenance more difficult. It’s probably easier and equally effective to override the responsible CSS rules that apply clear: both; rules to create the “line breaks”. Use your browser’s element inspector developer tool to identify the offending rules. Copy the entire rule, selectors and all, to the additional CSS panel of the customizer and edit the clear property to be none;.

    Apply the respective media query wrapper to the rules, such as

    @media only screen and (max-width: 981px) {
    /* rules for widths < 981 go here */
    }
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.