Taming Uneven Product Sizing on Shopify Mobile: A Flux Theme Fix

Hey everyone! As a Shopify migration expert, I spend a lot of time digging through the community forums, and let me tell you, some of the most helpful discussions come from real store owners solving real-world problems. Today, I want to dive into a recent thread that tackled a super common headache: getting your product collections to look just right on mobile, especially when you're working with a theme like Flux.

It's a familiar scenario: you've got your beautiful shop page all set up, looking pristine on desktop. But then you pull it up on your phone, and BAM – something looks… off. This is exactly what talsworld encountered with their COLDPOW® store using the Flux theme.

The Mobile Product Sizing Dilemma

talsworld's issue was pretty specific but resonates with many: on their shop page, particularly on mobile, the product images in their very first collection were significantly larger than the products in the collections below them. Why? Because that first collection only had two products. The theme was trying to fill the space, making those two items huge, while subsequent collections with more products were displaying a neat two-column grid. The goal was simple: make all collections show two products per row on mobile, regardless of how many items were in them.

This often boils down to how themes handle responsive design. Many themes are designed to adjust layouts based on screen size and content. When there are fewer items in a grid, some themes might default to a single, larger column to prevent awkward gaps or uneven spacing. While well-intentioned, it doesn't always deliver the visual consistency we want across our entire shop page.

Community to the Rescue! Two CSS Approaches

Luckily, the Shopify community is full of brilliant minds eager to help. Two experts, Moeed and v.marychenka, jumped into the thread with some excellent CSS solutions. What's great about this is that we got a couple of slightly different approaches, giving us options depending on our specific needs.

Solution 1: Moeed's General Approach

Moeed was the first to offer a fix, and talsworld quickly confirmed it worked! Moeed's solution targets a common slider element often used in collection sections, particularly for tablet views but also affecting smaller mobile screens.

Here's the CSS Moeed provided:

@media screen and (max-width: 767px) {
.slider.slider--tablet .slider-slide {
    width: calc(50% - 4rem) !important;
}
}

This code specifically tells any slider element within a tablet viewport (up to 767px wide) to display two items per row (50% width), with a bit of spacing (the 4rem). The !important tag ensures this style overrides any conflicting theme styles.

How to Implement Moeed's Fix:

  1. From your Shopify admin, navigate to Online Store > Themes.
  2. Find your current theme (ideally, duplicate it first by clicking Actions > Duplicate, so you have a backup).
  3. Click Customize.
  4. In the theme editor, navigate to the specific section where your collection is displayed. (For talsworld, this was likely a 'Featured Collection' or similar section.)
  5. Look for a 'Custom CSS' option within that section's settings. It might be at the very bottom of the sidebar settings.
  6. Paste the CSS code provided by Moeed into this 'Custom CSS' field.
  7. Save your changes and test on a mobile device.

Moeed even shared a helpful screenshot of the result:

Solution 2: v.marychenka's Targeted Approach

v.marychenka's analysis drilled down even further, noting that on phones, talsworld's 'BUNDLE & SAVE' section specifically was showing one card per row, making them huge, while other sections were fine. This points to the fact that sometimes, different sections or components in a theme might use slightly different CSS classes or IDs.

Here's the code v.marychenka suggested:

@media screen and (max-width: 989px) {
  #shopify-section-template--26901114290456__featured_collection_6jaKXm .grid-item {
    width: calc(50% - 4rem);
    flex: 0 0 auto;
  }
}

This solution is more targeted. It uses a broader max-width: 989px (covering more tablet and mobile devices) and specifically targets the grid-item within a unique section ID (#shopify-section-template--26901114290456__featured_collection_6jaKXm). The flex: 0 0 auto; is crucial here to ensure the items don't expand beyond their intended width and maintain the two-column layout correctly.

Important Note on Section IDs: v.marychenka wisely pointed out that the section ID (like shopify-section-template--26901114290456__featured_collection_6jaKXm) is dynamic. If you delete and re-add that specific section to your page, its ID will change. This means you might need to update the CSS code to match the new ID. You can usually find the section ID by inspecting the element on your live page using your browser's developer tools.

How to Implement v.marychenka's Fix:

  1. First, always duplicate your theme (Online Store > Themes > Actions > Duplicate) before making code changes. Shopify Support won't troubleshoot custom forum code!
  2. From your Shopify admin, navigate to Online Store > Themes.
  3. Click Actions > Edit code for your duplicated theme.
  4. Under the Assets folder, find a file named theme.css, base.css, or custom.css (the exact name varies by theme).
  5. Paste the CSS code at the very bottom of this file. Alternatively, some themes have a 'Custom CSS' area directly in Theme settings (accessible via Online Store > Themes > Customize > Theme settings > Custom CSS). This is often the safest place for custom snippets.
  6. If you use the section-specific ID, ensure it matches your current section's ID.
  7. Save your changes and thoroughly test on various mobile devices.

Which Solution to Use?

Both Moeed and v.marychenka offered solid CSS to solve the problem. Moeed's solution is a bit more general, targeting a common slider class, which might apply to multiple collection sections if they use that same structure. v.marychenka's solution is surgically precise, targeting a specific section by its unique ID. If you're experiencing the issue across all your mobile collection sliders, Moeed's might be a quicker fix. If it's only happening in one particular section, v.marychenka's approach ensures you're only modifying what's necessary, reducing potential side effects.

My advice? Start with Moeed's if your theme has a general slider component. If that doesn't quite hit the mark, or if the problem is isolated to one section, use v.marychenka's approach, making sure to grab the correct section ID. Always, always test thoroughly on different devices!

A Little Extra Tip from the Thread

As a bonus, Moeed also pointed out a small but critical detail on talsworld's site: a 'SHOP 3-DAY PACKS' button was incorrectly linking to the '30-DAY PACKS' section. This is a fantastic reminder for all of us: when you're making changes or even just reviewing your site, keep an eye out for these little details. They can silently impact user experience and conversions! A smooth user journey is key to a successful Shopify store, so double-checking all your links and navigation is never a wasted effort.

This thread is a perfect example of the power of the Shopify community. A store owner had a specific visual glitch, and experts jumped in with practical, code-based solutions that not only fixed the immediate problem but also offered insights into responsive design and theme customization. If you're running into similar mobile layout challenges with your Flux theme or any other Shopify theme, don't be afraid to experiment with custom CSS. It's a powerful tool to fine-tune your store's look and feel, ensuring a consistent and professional experience for all your customers, no matter how they're browsing.

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases