Tired of That Annoying Gap? How to Fix Empty Space on Your Shopify Product Cards (Horizon Theme & Beyond)
Hey there, fellow store owners! Ever found yourself staring at your beautiful Shopify product grid, only to be irked by some stubborn, unexplained empty space? You know, that little gap that just shouldn't be there, making your product cards feel less polished than they ought to be? If so, you're definitely not alone. It's a surprisingly common frustration, and one that recently popped up in the Shopify Community forums, perfectly illustrating why our collective knowledge is so powerful.
Our community member, xsanxdrox, brought this exact issue to light. They were struggling with an annoying gap between their product's 'Buy Button' and the bottom border of the product card, specifically on the Horizon Theme. And get this – they'd even tried consulting AI tools like ChatGPT and Claude without success! Talk about a head-scratcher.
It's a classic case of a small visual glitch that can make a big difference in how professional your store looks. Imagine your product cards, designed to showcase your items, but with a noticeable, unwanted void just above the 'Add to Cart' or 'Buy Now' button. It can throw off the whole aesthetic, making things feel a bit… unfinished. Here's what xsanxdrox was seeing:

Thankfully, the Shopify Community is a treasure trove of helpful folks, and Moeed stepped in with an elegant solution. After a quick exchange to get the store URL and theme details (always a good first step for debugging!), Moeed delivered a simple yet incredibly effective CSS snippet. This is where the magic happens, folks!
The core of the fix lies in adjusting how the elements within the product card are distributed. Many modern themes, including Horizon, use a flexible box layout (Flexbox) for these components, and sometimes the default alignment can leave those pesky gaps.
How to Remove Empty Space Between Buy Button and Card Border
Step 1: Access Your Theme Code
- From your Shopify admin, navigate to Online Store.
- Click on Themes.
- Find the theme you want to edit (it's always a good idea to duplicate your theme first for a backup!). Click Actions > Edit code.
Step 2: Locate the theme.liquid File
In the 'Layout' directory on the left sidebar, find and click on the theme.liquid file. This file acts as the global template for your store, and adding custom CSS here ensures it applies across your site.
Step 3: Add the Custom CSS Code
Scroll to the very bottom of the theme.liquid file. You'll want to paste the following code snippet just above the closing
