Taming Product Image Sizes: Fixing Mobile Collection Layouts in Shopify's Flux Theme
Hey everyone! As a Shopify expert and community analyst, I often see store owners grappling with design quirks. A recent thread about product sizing in the Flux theme on mobile caught my eye. It’s a perfect example of how a small piece of custom code, shared by the community, can solve a big headache.
The Mobile Sizing Head-Scratcher: What Was Going On?
Our fellow store owner, talsworld, brought up a common frustration: their first collection on the shop page, when viewed on a phone, showed product images that were significantly larger than those in subsequent collections. The culprit? That first collection only had two products. This meant instead of neatly lining up two products per row, the theme was stretching them out, making them look disproportionate.
This isn't exclusive to Flux. Many responsive Shopify themes make assumptions about content. When your product count doesn't match, you get unexpected layouts, leading to a less-than-ideal mobile experience.
The Community to the Rescue: Custom CSS Solutions
The Shopify community truly shines in these moments. Contributors Moeed and v.marychenka both offered custom CSS solutions, aiming to force a consistent two-per-row layout on mobile, regardless of the collection's product count.
Understanding the Fix: Why Custom CSS?
Shopify themes offer flexibility, but custom CSS provides pixel-perfect control. It lets you override or add styles without directly modifying core theme files, which is great for updates. For sizing issues, telling the browser exactly how wide each product card should be on different screens is the most direct approach.
Step-by-Step: Implementing the Custom CSS
Before you dive in, a golden rule of theme customization: always duplicate your theme first! Go to your Shopify admin, navigate to Online Store > Themes, find your current theme, click Actions > Duplicate. This creates a safe backup in case anything goes awry.
Option 1: Moeed's General Approach (Recommended for broader impact)
Moeed's solution targets a common class used by product sliders on tablets and phones. This makes it a good general fix that might apply to multiple sections.
- From your Shopify admin, go to Online Store > Themes.
- Find your active theme and click Customize.
- In the theme editor, navigate to the section where your problematic collection is displayed. Look for a 'Custom CSS' or 'Custom Liquid' option within that section's settings in the left sidebar. If you can't find it there, you might need to go to Theme settings > Custom CSS (usually at the very bottom of the theme settings list).
- Paste the following code into the Custom CSS box:
@media screen and (max-width: 767px) {
.slider.slider--tablet .slider-slide {
width: calc(50% - 4rem) !important;
}
}
What this code does:
@media screen and (max-width: 767px): This media query applies styles only if the screen width is 767 pixels or less, covering most mobile phones..slider.slider--tablet .slider-slide: These CSS selectors target the specific product cards within the Flux theme's slider component.width: calc(50% - 4rem) !important;: This forces each product card to take up 50% width, minus4rempadding for spacing. The!importanttag ensures it overrides default styles.
Moeed even shared a visual of the result, which I've included here for reference:

Talsworld confirmed that this solution worked for them, which is always a great sign!
Option 2: v.marychenka's Section-Specific Approach
V.marychenka's fix targeted a specific section ID. While effective, these IDs can change if you re-add sections. If you're comfortable with developer tools, you can inspect your page to find your section's unique ID.
- Follow steps 1-3 from Option 1 to get to your Custom CSS area.
- Paste the following code:
@media screen and (max-width: 989px) {
#shopify-section-template--26901114290456__featured_collection_6jaKXm .grid-item {
width: calc(50% - 4rem);
flex: 0 0 auto;
}
}
This code is similar, but flex: 0 0 auto; prevents unexpected card growth. Its wider media query (up to 989px) might also cover some tablet sizes.
Which Solution Should You Use?
Since talsworld confirmed Moeed's solution, and it uses generic class selectors, I suggest starting with Moeed's approach (Option 1). It's less prone to breaking if sections are rearranged. If that doesn't work, v.marychenka's targeted approach is an option, especially if you can find your section's unique ID.
Remember, Shopify Support typically won't troubleshoot custom code added to your theme, so always test thoroughly!
A Bonus Tip from the Thread: Don't Forget the Details!
Beyond CSS, Moeed offered a vital reminder about store health. He spotted a "SHOP 3-DAY PACKS" button incorrectly linking to "30-DAY PACKS". This shows how crucial it is to thoroughly test your site; fresh eyes can spot errors impacting user experience and conversions.
These community interactions make managing a Shopify store so much more manageable. You're not alone in building your online business. Whether it's a quick CSS tweak or a deeper theme dive, someone in the community has likely faced and solved a similar challenge. A perfect mobile layout is critical for conversions, so use these powerful tools to fine-tune your Shopify store. Keep experimenting, learning, and sharing those insights!