Centering Buttons on Your Shopify Mobile Site: A Community Solution
The Case of the Left-Aligned Buttons
Ever feel like your Shopify store's mobile experience is just...off? We've all been there! Recently, a store owner, @User026, popped into the Shopify community forum with a super common issue: buttons stubbornly sticking to the left side of the screen on mobile. Specifically, they were trying to center three buttons on their signup page (mytutor.nl). Here's how they described the problem:
Hi guys, I have three buttons on our signup page (mobile version). I would like to center them in the middle instead of having them aligned to the left. How can I do this?
And here's a peek at what they were seeing:
The good news? It's a pretty straightforward fix!
The Community's Quick CSS Solution
Fellow community member Moeed jumped in with a code snippet designed to center those buttons on smaller screens. Here's the code they suggested:
And here's a look at the result:
How to Implement the Fix
Here's a breakdown of exactly how to apply this fix to your Shopify store:
- Access Your Theme Code: From your Shopify admin, go to "Online Store" and then "Themes."
- Edit Code: Click the "..." button on your active theme and select "Edit code."
- Locate theme.liquid: In the code editor, find the
theme.liquidfile. It's usually in the "Layout" folder. - Add the CSS: Paste the provided CSS code just above the

