Fixing Wonky Product Thumbnails in Your Shopify Horizon Theme: A Community CSS Solution
Hey everyone! Your friendly Shopify expert here, diving into another gem from the community forums. You know, one of the best things about the Shopify ecosystem is how we all help each other out. Recently, I stumbled upon a thread that perfectly illustrates this spirit, tackling a pesky visual glitch in the popular Horizon theme. If you've been scratching your head over product page thumbnails looking a bit... off, you're definitely not alone. Let's talk about enssle's dilemma and how tim_tairli swooped in with a brilliant fix.
The Mystery of the Mismatched Thumbnails
Our fellow store owner, enssle, was wrestling with their product page thumbnails in the Horizon theme. Despite meticulously preparing images, checking settings, and even trying some CSS tweaks, the thumbnails just weren't behaving. They weren't covering the designated space, and their proportions were all wrong, making the product page look less than polished. enssle specifically wanted to display thumbnails next to the main product carousel, and this visual hiccup was a real roadblock.

When Global Styles Get a Little Too Enthusiastic
This is where the community magic happens. When enssle shared a preview link to their store, tim_tairli quickly jumped in to diagnose the issue. And boy, was it a classic case of CSS specificity gone wild!
What tim_tairli uncovered was pretty insightful. It turns out that some global button styling, likely added either directly in your Theme Settings' Custom CSS or perhaps by a developer in layouts/theme.liquid, was a little too enthusiastic in its application. Take a look at the code tim_tairli shared:
/* GLOBAL BUTTON STYLING — HORIZON THEME */
/* Shared button base */
.button,
button.button,
a.button,
.shopify-payment-button__button,
.product-form__submit {
font-family: var(--font-body-family);
font-size: 15px;
font-weight: 600;
line-height: 1;
letter-spacing: 0.1em;
min-height: 40px;
padding: 0 28px; /* <-- offending line */
border-radius: 0px;
text-transform: none;
}
/* Primary buttons */
.button--primary,
button.button--primary,
a.button--primary,
.product-form__submit {
min-height: 52px;
padding: 0 32px;
font-size: 15px;
} /* Secondary buttons */
.button--secondary,
button.button--secondary,
a.button--secondary {
min-height: 48px;
padding: 0 28px;
font-size: 14px;
}
/* Mobile button sizing */
@media screen and (max-width: 749px) {
.button,
button.button,
a.button,
.shopify-payment-button__button,
.product-form__submit {
min-height: 46px;
padding: 0 24px;
font-size: 14px;
}
.button--primary,
button.button--primary,
a.button--primary,
.product-form__submit {
min-height: 50px;
padding: 0 26px;
}
.button--secondary,
button.button--secondary,
a.button--secondary {
min-height: 44px;
padding: 0 22px;
}
}
See that padding: 0 28px; line under the /* Shared button base */ comment? That's the culprit! The problem was that these general selectors, like .button, button.button, and a.button, were applying styles to elements that weren't just buttons in the traditional sense. Specifically, the product page carousel thumbnails in the Horizon theme are actually rendered as elements. So, they were inheriting all that button styling, including the unwanted padding, which was squishing the images and messing with their proportions.
The Elegant Solution: A Targeted CSS Override
The beauty of this fix lies in its simplicity and precision. Instead of trying to undo the global styling, tim_tairli suggested a targeted override. Here's how you can implement it if you're facing a similar issue:
- Navigate to Your Theme Editor: In your Shopify admin, go to
Online Store>Themes. - Edit Your Current Theme: Find your active Horizon theme (or the one you're working on) and click
Customize. - Access Theme Settings: In the theme editor, look for the
Theme settingstab, usually on the left sidebar. - Find Custom CSS: Scroll down or look for an option like
Custom CSSorAdvanced CSS. This is where you can add your own styling rules without directly editing the theme's core files (which is always a good practice!). - Add the Override Code: Paste the following CSS snippet into the Custom CSS box:
.button.slideshow-controls__thumbnail {
padding: 0;
}
- Save Your Changes: Don't forget to hit the
Savebutton!
Why This Fix Works
This small but mighty piece of code, .button.slideshow-controls__thumbnail { padding: 0; }, specifically targets elements that are both a .button class and a .slideshow-controls__thumbnail class. By setting padding: 0; for these specific elements, you're telling the browser, 'Hey, for these particular buttons (our thumbnails), ignore that general padding rule and just give them no padding.' This effectively lets the images fill their containers correctly, restoring their intended proportions.
A Happy Ending for Horizon Theme Owners
enssle quickly applied this fix, and guess what? It worked like a charm! They were thrilled, and their product page thumbnails were back to looking sharp and professional. It just goes to show that sometimes, a tiny bit of targeted CSS can make all the difference in your store's appearance.
So, if you're ever struggling with visual quirks in your Shopify theme, especially after some custom development or even just theme updates, remember this story. Often, the solution isn't about complex overhauls but rather a precise adjustment to CSS specificity. Always check your browser's developer tools to inspect elements and see what styles are being applied — it's a powerful detective tool! And don't hesitate to lean on the incredible Shopify community; there's a wealth of knowledge and helpful experts ready to lend a hand. Happy customizing!