Shopify Review Stars Misaligned? Master Margin & Alignment for a Polished Look!

Hey there, fellow store owners! Ever found yourself staring at your beautiful Shopify store, only to have a tiny, nagging detail catch your eye? You know, that one element that just doesn't quite line up with everything else? It's a common little niggle, and often, it's something as crucial as your customer reviews.

Recently, we saw a great discussion pop up in the Shopify community that really hits this point home. A store owner, @atmos-art, was looking to fix the alignment of their review stars and text on their Abstract Photography Workshops page. They had a custom liquid section displaying reviews, but it wasn't respecting the theme's default margins, leaving it looking a little... off-kilter. This is a super common scenario, especially when you're integrating third-party review apps or using custom sections.

Thankfully, the community jumped in with some fantastic, actionable advice. Let's dive into how you can tackle this alignment challenge and get your review sections looking perfectly polished.

The Problem: Misaligned Review Stars and Text

The core issue @atmos-art faced was that their review section, likely powered by a Custom Liquid block, wasn't lining up with the left and right edges of their other page sections. This can create an inconsistent and less professional look, which is the last thing you want when showcasing valuable social proof!

Solution 1: Global CSS Adjustment for Custom Liquid Sections

One direct approach, shared by @devcoders, involves adding a snippet of CSS to your theme's main stylesheet. This is a great solution if you want a consistent padding adjustment across all your Custom Liquid sections, or if your theme doesn't offer a specific 'Custom CSS' area for individual sections.

How to Implement (devcoders' method):

  1. In your Shopify Admin, navigate to Online Store > Themes.
  2. Find your current theme, click Actions, then select Edit code.
  3. Under the Assets folder, locate a file like base.css, theme.css, or styles.css (it varies by theme, but base.css is a common one for core styles).
  4. Scroll to the very bottom of the file and paste the following CSS code:
.shopify-section[id*="__custom_liquid_"] > div {
  padding-left: 50px !important;
  padding-right: 50px !important;
}

The !important flag here tells the browser to prioritize these padding rules, which can be useful when overriding existing theme styles. Just remember to use it sparingly, as it can make future CSS debugging a bit trickier.

Solution 2: Leveraging the Dawn Theme Editor's Custom CSS

For those running the popular Dawn theme (or other modern themes that offer similar functionality), @Ploqo shared an even more elegant and localized solution. This method uses the built-in 'Custom CSS' feature within the theme editor for specific sections, which is fantastic for making targeted adjustments without cluttering your main stylesheet.

How to Implement (Ploqo's method for Dawn):

  1. From your Shopify Admin, go to Online Store > Themes.
  2. Click the Customize button on your live Dawn theme (or whichever theme you're editing).

  1. Use the page selector at the top to navigate to the specific page where your review section is located (e.g., Abstract Photography Workshops).
  2. In the left sidebar, click on the Custom Liquid section that contains your review stars/text.

  1. In the section settings (left sidebar), scroll down until you see the Custom CSS field. Paste the following code:
.gradient > div {
  max-width: var(--page-width);
  margin: 0 auto;
  padding-left: 5rem;
  padding-right: 5rem;
}
@media (max-width: 749px) {
  .gradient > div {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

This code is particularly smart because it uses CSS variables like var(--page-width) to match your theme's defined content width and includes a media query for responsive adjustments on smaller screens (max-width: 749px). This ensures your reviews look great on both desktop and mobile!

  1. Click Save in the top right corner.

Which Solution is Right for Your Store?

Both methods are effective, but they cater to slightly different needs:

  • Devcoders' method (editing base.css) is a more global approach. If you have many Custom Liquid sections across your site that need the same padding adjustment, this can be a quick way to apply it broadly. Just be mindful of the !important tag and its implications for future styling.
  • Ploqo's method (Dawn Theme Editor's Custom CSS) is more targeted and often preferred for modern themes. It keeps your CSS specific to the section you're modifying, making it easier to manage and less likely to cause unintended conflicts elsewhere. Plus, the responsive design built into the snippet is a huge bonus! This is often the cleanest way to make these kinds of adjustments if your theme supports it.

It's great to see that @atmos-art found success with one of these solutions, confirming that a little CSS magic can go a long way in perfecting your store's aesthetics.

Remember, before making any code changes to your live theme, it's always a good practice to duplicate your theme first. This way, you have a backup and can test changes without impacting your customers. The Shopify platform is incredibly flexible, allowing you to fine-tune almost every aspect of your store's appearance. If you're just starting out or looking to upgrade your online presence, don't hesitate to explore what Shopify has to offer. There's a whole community ready to help you make your store shine!

Getting those little details right, like consistent alignment, can make a significant difference in how professional and trustworthy your store appears to visitors. Keep experimenting, keep learning, and keep asking questions in the community – that's how we all grow together!

Share:

Start with the tools

Explore migration tools

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

Explore migration tools