BUTTON DESIGN

Topic summary

A Shopify store owner seeks help changing button styles from rounded to rectangular and fixing button alignment issues on their product pages.

Initial Problem:

  • Wants to convert rounded buttons to rectangular shape
  • “Buy Now” button text not centered
  • Includes visual examples and live shop link

Solutions Provided:
Multiple community members offered CSS code solutions:

  • Add custom CSS to remove border-radius and adjust padding
  • Code can be placed in Custom CSS section, theme.liquid file, or theme.css file
  • All solutions use border-radius: 0 !important to achieve rectangular buttons

Follow-up Requests:

  • Make buttons shorter on desktop only (not mobile)
  • Adjust SKU variant buttons to be shorter
  • Match height between “Add to Cart” and “Buy Now” buttons
  • Change variant selector button style

Current Status:
Discussion remains ongoing with iterative refinements. The user successfully implemented the rectangular button style but continues requesting additional height/width adjustments and desktop-specific modifications. Community members continue providing updated CSS code snippets to address each new requirement.

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

How to change button style to rectangle?

to

why dmy buy now button text isn’t on ceneter
please help me

here is my shop
plz check

ᒪᗩᐺᒪყ Official Website|ᒪᗩᐺᒪყ 公式HP| – Lavly

1 Like

Please add this code to Cutom CSS in Online Store > Themes > Customize > Theme settings

.product-form__input--button input[type=radio]+label,
html #shopify-section-template--24258380923154__main .product-form__buttons button {
border-radius: 0 !important;
}
html #shopify-section-template--24258380923154__main .product-form__buttons button {
padding: unset;
}

Hi @lavly
I hope you are well. You can follow our instructions below:
1/ Shopify admin > Online store > Edit code
2/ Search for “theme.liquid” file
3/ Open the file and search for tag and add the following code above tag
Here is the code for Step 3:

{% style %}
.product-form__buttons .product-form__submit{
    border-radius: 0!important;
}
.product-form__buttons .shopify-payment-button__button{
    border-radius: 0!important;
    padding: unset!important;
}
{% endstyle %}

If this helpful, please let us know by giving us a like and marking its as a solution. Thanks you :heart_eyes:

Hi @lavly

You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file theme.css and add this code at the end of the file

.product-form__buttons .product-form__submit{
    border-radius: 0 !important;
}
.product-form__buttons .shopify-payment-button__button{
    border-radius: 0 !important;
    padding: unset !important;
}

Result

Best,

Liz

thank you, it worked.
do you know how to make button shorter only on desktop, not mobile.

lavly_0-1740127246101.png

and i want to change this sku button too

and want to make shorter

plz help me.

thank you, it worked.
do you know how to make button shorter only on desktop, not mobile.

lavly_0-1740127383847.png

and i want to change this sku button too

and want to make shorter

plz help me.

thanks, it works on preview
but when i press the save button, it;s impossible to save because of an error

1 Like

Hi @lavly
Full code is:

{% style %}
.product-form__buttons .product-form__submit{
    border-radius: 0!important;
}
.product-form__buttons .shopify-payment-button__button{
    border-radius: 0!important;
    padding: unset!important;
}
.product-form__input > label {
    font-size: 12px!important;
}
{% endstyle %}

So please open theme.liquid file in Online Store > Themes > Edit code, after add this code


1 Like

it changed wierd

If this helpful, please let us know by giving us a like and marking its as a solution. Thanks you :heart_eyes:

1 Like

thank u it works!
but i want same height with this two button,

can you plz make it little shorter only on desktop?

it isn;t what i want.
please check this img

this is what i want

Hi @lavly

You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file theme.css and add this code at the end of the file

.product-form__input--button-circle input[type=radio]+label:not([data-swatch-type=variant_image],[data-swatch-type=color_swatch],[data-swatch-type=shopify_swatch],[data-swatch-type=text]) {
    border-radius: 20px !important;
}

Result