Customize add to cart button size dawn theme

Topic summary

A user wants to resize their “Add to Cart” button in the Dawn theme to match the width of adjacent widgets for a cleaner, more consistent appearance. The button currently appears slightly shorter than other elements on the product page.

Solutions provided:

  • Option 1: Add custom CSS code to the theme.liquid file (above </head> tag) to control button sizing
  • Option 2: Remove or override the existing CSS rule .product-form__buttons { max-width: 44rem; } that limits button width
  • Recommended approach: Set max-width: 100% !important to allow the button to expand to full available width

Both solutions involve CSS modifications either through the theme code editor or custom CSS additions. The user confirmed the solution worked.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hello,

I would like to customize the size of my add to cart button to match my widgets next to it, so everything looks clean.

( ^ Here is how it looks now, it is slightly shorter than the one above and below. I want it to match the size, no matter the screen size that it is being viewed from)

Store: artisimo.es

pass: pongia

@JordiP ,

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above


Result:

If it helps you, please like and mark it as the solution.

Best Regards :blush:

1 Like

Hi there :slightly_smiling_face:

You have this CSS rule that is setting a max-with for product form buttons:

.product-form__buttons {
  max-width: 44rem;
}

Just remove that line, so the button grows the full available width:

If you don’t have access to that piece of code and can’t remove it, then you’ll need to add this custom CSS to your theme to overwrite it:

.product-form__buttons {
  max-width: 100% !important;
}

Thanks!