How to move the Add to Cart Button on product pages (default theme)

Topic summary

A user wants to reposition the “Add to Cart” button on product pages to align horizontally with the quantity selector, rather than appearing below it.

Attempted Solution:

  • One responder provided CSS code to be added to the theme.liquid file before the </body> tag
  • The code uses negative margins and width calculations to reposition the button

Current Status:

  • The proposed CSS solution did not work when implemented
  • Multiple community members requested the store URL to provide more targeted assistance
  • The issue remains unresolved, with the user confirming the code was pasted correctly but produced no visual changes
Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

I would like to move the Add to Cart Button on my product pages from it’s current location to in line with the Qty Button. Can you please advise how to do this? Thanks

1 Like

hey @Jamw0rks plz share the URL of your website so i can help you

Hey @Jamw0rks

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

Best Regards,
Moeed

Hello there @Jamw0rks I suggest that you try out the following steps-

  1. Go to Online Store → Theme → Edit code
  2. Open your theme.liquid theme file
  3. Paste below code before :
<style>
     .button--full-width {
        width: calc(100% - 150px) !important;
        margin-top: -76px;
        margin-left: 150px;
     }
</style>

Let me know if this works well for you!

Hi, thank you for your response. I pasted the code as instructed but unfortunately nothing changed.