Mastering Shopify Theme Customization: Rainbow Backgrounds & Pink Buy Buttons

Ever found yourself staring at your Shopify store, thinking, "This looks great, but what if I could just tweak that one thing?" You're definitely not alone! It's a common scenario for store owners who want their brand to truly shine, and it often leads them straight to the incredibly helpful Shopify Community forums. I was recently looking through some discussions and came across a fantastic thread that really highlighted this exact point: customizing your theme's look to perfection.

The Quest for a Perfect Product Page Aesthetic

Our story starts with Courtney_Stevens, who was working on an unpublished theme, aptly named "Copy of Balance." Courtney had a clear vision: she wanted her product pages to match her vibrant homepage, which boasted a beautiful pink-to-blue rainbow background. While the main product area was already rocking this gradient, the header remained stubbornly white, and the footer, a dull light grey. On top of that, she wanted to transform the standard white "Buy it now" button into a cheerful pink.

Now, these might sound like small details, but in the world of e-commerce, consistency and branding are everything! Courtney had already tried a few things, like setting the product hero to "Scheme 1" and attempting to apply the same scheme to the footer, but no luck. Even Shopify Support pointed her to some custom styling in assets/lp-landing.css that was causing the issue by setting backgrounds separately. This is where the community really shines!

Unlocking Your Theme's Potential with Custom CSS

This is where PinFlow, a fellow community member, stepped in with a brilliant and concise solution. What PinFlow provided wasn't just a quick fix; it was a masterclass in understanding how Shopify themes, particularly those with existing custom CSS, can be gently nudged into alignment with your brand vision. The key insight here was to apply the rainbow gradient to the entire body of the page and then make the specific sections (like the header, footer, and main content area) transparent so the background could show through. And, of course, a specific tweak for that "Buy it now" button.

The Magic Behind the Code: What PinFlow Taught Us

Let's break down the CSS provided by PinFlow. It’s a great example of how a few lines of code can make a huge impact:

body {
  background: linear-gradient(180deg, #ffc2e2 0%, #e3c9ff 50%, #b9e0ff 100%) !important;
}
#MainContent,
#MainContent .gradient,
.header-wrapper,
.header-wrapper.gradient,
.footer,
.footer.gradient {
  background: transparent !important;
}
.shopify-payment-button__button--unbranded {
  background: #ff5fa8 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
  • body Background: The first rule applies a beautiful vertical rainbow gradient (from pink to purple to light blue) to the entire page body. The !important flag ensures it overrides any other background styles.
  • Making Sections Transparent: The second block targets specific elements like #MainContent, .header-wrapper, and .footer (including their .gradient variants, which is a smart move to catch different theme implementations). By setting their background: transparent !important;, these sections effectively become see-through, allowing the glorious rainbow background of the body to shine through.
  • Styling the "Buy it now" Button: Finally, the .shopify-payment-button__button--unbranded selector precisely targets the direct checkout button. It changes its background to a specific shade of pink (#ff5fa8), sets the text color to white, and removes any default shadow, giving it a clean, branded look.

Your Step-by-Step Guide to a Rainbow Product Page

Ready to apply this transformation to your own store? Here’s how PinFlow walked Courtney (and now you!) through the process. Remember, always work on a duplicate theme first – it’s your safety net!

  1. Duplicate Your Theme (Crucial First Step!): Before making any code changes, always create a duplicate of your live theme. This ensures your active store remains untouched. In your Shopify admin, go to Online Store > Themes. Find your current theme (or the one you want to modify, like "Balance" in Courtney's case), click the … (Actions) button, and select Duplicate. You’ll then perform the following steps on this duplicated theme (e.g., "Copy of Balance"). Online Store, Themes, Edit code
  2. Access Theme Code: Once your duplicate theme is ready, click the … (Actions) button next to it and choose Edit code.
  3. Locate the CSS File: In the file list on the left, open the Assets folder and look for the specific CSS file mentioned, which in Courtney's case was lp-landing.css. This might vary depending on your theme, but it's often a good place for custom CSS.
  4. Paste the Code: Scroll to the very end of the lp-landing.css file. Click after the last line, press Enter twice for some clean spacing, and then paste the following code:
    body {
      background: linear-gradient(180deg, #ffc2e2 0%, #e3c9ff 50%, #b9e0ff 100%) !important;
    }
    #MainContent,
    #MainContent .gradient,
    .header-wrapper,
    .header-wrapper.gradient,
    .footer,
    .footer.gradient {
      background: transparent !important;
    }
    .shopify-payment-button__button--unbranded {
      background: #ff5fa8 !important;
      color: #ffffff !important;
      box-shadow: none !important;
    }
    
    lp-landing.css with the code pasted at the bottom
  5. Save Your Changes: Click the Save button at the top right of the code editor. Save button
  6. Review and Customize: Now, reload one of your product pages on the duplicate theme. You should see the rainbow background extending beautifully across the header, main content, and footer, and your "Buy it now" button should be a lovely pink! PinFlow also wisely pointed out that you can easily swap the three color codes in the linear-gradient rule to perfectly match your homepage's exact rainbow, and the pink button color is the last color code (#ff5fa8) if you want to tweak that too.

Here’s a quick look at the transformation:

Before

After

Why This Matters for Your Store

This little exchange in the Shopify Community is a fantastic reminder that even seemingly complex design challenges can often be solved with a bit of targeted CSS and the right guidance. It highlights the flexibility of the Shopify platform – you really can make it your own – and the incredible value of a supportive community. Whether you're just starting your journey on Shopify or looking to refine your existing store, don't hesitate to dive into these kinds of discussions. It's where you'll find real-world solutions and learn best practices from other store owners and experts. Being able to customize your store's look and feel, even down to the smallest button, can significantly impact your brand's perception and customer experience. If you're inspired by these possibilities and thinking about building your own unique online presence, starting a Shopify store gives you all the tools to bring your vision to life.

So, next time you have a design itch, remember Courtney's rainbow quest. A little digging, a bit of code, and a lot of community spirit can go a long way in making your Shopify store truly stand out!

Share:

Start with the tools

Explore migration tools

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

Explore migration tools