Solving the Annoying 'View Details' Button Alignment & Spacing on Shopify

Hey everyone! As a Shopify migration expert, I spend a lot of time digging through the community forums, and it’s always fascinating to see the common threads that pop up. Recently, I stumbled upon a really common, yet super frustrating, little issue that many store owners face: a misbehaving "View full details" button. You know the one – it's crucial for product pages, but sometimes it just doesn't play nice with your theme's styling. The discussion, originally titled "Need help fixing a button" by `gavboy555`, really resonated because it’s a perfect example of how small CSS tweaks can make a huge difference in your store's professionalism. `gavboy555` posted with a clear problem: their "View full details button" was too close to the "Add to Cart" button, and to top it off, the little arrow next to the text was completely out of alignment. They even shared a screenshot (which I'll include below so you can see exactly what they were talking about). Screenshot of misaligned Shopify button This is a classic case of default theme styling or perhaps a minor conflict with custom CSS. It’s not just about aesthetics; a cramped or misaligned button can make your product page look unfinished, potentially impacting customer trust and conversion. The beauty of the Shopify community is how quickly people jump in to help. Several experts offered solutions, and after reviewing them all, there’s a really solid, comprehensive approach that I want to share with you. The key to fixing this lies in adding a few lines of CSS to your theme's `base.css` file. This file is often where your main styles live, and adding code to the very end ensures it overrides any conflicting styles that might be causing the issue. Here's the breakdown of how to get that "View full details" button looking sharp, based on the insights shared by community members like `Mateo-Penida` and `SectionKit`:

Step-by-Step: Fixing Your Button's Spacing and Alignment

  1. Access Your Theme Code:

    First things first, you need to get into your theme's code editor. Don't worry, it's not as scary as it sounds!

    • From your Shopify Admin, go to Online Store.
    • Click on Themes.
    • Find your current theme, click the three dots (Actions button), and select Edit code.
  2. Locate Your Main CSS File:

    In the `Assets` folder (it's usually under `Sections` or `Layout` in the sidebar), look for `base.css`. Sometimes it might be called `theme.css` or `styles.css` depending on your theme, but `base.css` is a very common one.

  3. Add the CSS Code:

    Scroll right down to the very end of the `base.css` file. It's best practice to add custom CSS at the bottom so it takes precedence. Here's the code that `Mateo-Penida` suggested, which I found to be the most effective for addressing both spacing and alignment:

    .product_view-details.animate-arrow {
      margin-top: 1.5rem;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }

    Let's quickly break down what this code does:

    • .product_view-details.animate-arrow: This is the CSS selector targeting your specific "View full details" button.
    • margin-top: 1.5rem;: This is the magic for spacing! It adds 1.5 rem (a relative unit, typically about 24px) of space above the button, pushing it away from the "Add to Cart" button. If you need more or less space, just adjust this value (e.g., `1rem`, `2rem`, `15px`, etc.).
    • display: inline-flex;: This is crucial for aligning elements within the button (like the text and the arrow). It turns the button into a flexible container.
    • align-items: center;: With `display: inline-flex` active, this property vertically centers the content (text and arrow) within the button, fixing that annoying arrow misalignment.
    • gap: 0.5rem;: This adds a small, consistent space between the text and the arrow, ensuring they don't look crammed together.

    Another excellent suggestion from `SectionKit` and `liquidshop.co` focused on `display: flex` and `padding-top`. While `padding-top` can certainly add space, `margin-top` is often preferred for spacing between distinct elements. However, if you find `margin-top` isn't quite doing it for your specific theme, you could try this variation (though `align-items: center` is still key for arrow alignment):

    a.link.product__view-details.animate-arrow {
        display: inline-flex;
        padding-top: 10px;
    }

    Or even this one from `SectionKit`:

    a.link.product__view-details.animate-arrow {
        display: flex;
        padding-top: 15px;
    }

    Remember, themes can be quirky, so sometimes a little experimentation is needed. The important part is making sure you have `display: inline-flex` (or `flex`) and a method to center the items (`align-items: center`).

  4. Save and Preview:

    Once you've pasted the code, hit Save. Then, navigate to your online store and check a product page to see the changes. You should immediately notice the "View full details" button has more breathing room and the arrow is perfectly aligned with the text.

    Here’s an example of what a well-aligned button might look like:

    Image showing corrected button alignment and spacing

    And another visual from `SectionKit` illustrating the desired outcome:

    Image of a button with corrected display and padding

It’s always amazing to me how a few lines of CSS can really elevate the professional look and feel of a Shopify store. This particular fix is a fantastic example of the community coming together to solve a common pain point. Don't be afraid to experiment with the `margin-top` or `padding-top` values to get the exact spacing you desire for your unique theme. A well-styled button is a small detail, but it contributes so much to a seamless customer experience. Happy customizing!

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools