Move ATC and quantity selector to the same line

Topic summary

A Shopify store owner wants to reposition their Add to Cart (ATC) button and quantity selector to appear on the same horizontal line, with payment icons displayed underneath. Currently, these elements are stacked vertically.

Proposed Solutions:

  • Two community members provided CSS code snippets to be added to the theme files (base.css, style.css, or theme.css)
  • The modifications involve adjusting positioning, width, and layout properties of the product form elements

Current Status:

  • The initial CSS solution reduced the ATC button size but didn’t achieve the desired inline layout
  • The original poster requested mobile optimization to ensure the layout works on smaller screens
  • One helper clarified they didn’t optimize for mobile because smaller buttons could create usability issues and accidental clicks
  • The conversation appears to have concluded with the poster thanking the helpers, though the complete solution status remains unclear
Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

How can I make my atc turn into this( picture with ATC and quantity in the same line, with payment icons right under)? Currently its like the picture with green ATC. This is the store link: https://lifyi.com/products/necklace-love

anzestrazar_0-1706193756535.png

1 Like

Hey @anzestrazar ,

Please add this CSS

  1. Go to Online Store > Theme > Edit code.

  2. Open the theme.liquid file

  3. Paste the below code before on theme.liquid


Hi @anzestrazar

Check this one.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

@media only screen and (min-width: 749px){
product-form.product-form {
    width: 26rem;
    position: absolute;
    bottom: 3%;
    left: 150px;
}
}

And Save.

Result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hello, this made my ATC smaller, but it didn’t move it in line with the quantity. Can you please help?

I forgot to specify, but can you make it so it works on mobile?

Im sorry im not getting it, you want only in the mobile screen? I didn’t optimize it for mobile because the button would be too small, making it less user-friendly and prone to accidental clicks.

Oh ok, thanks for the help!

1 Like

Welcome! Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!