Dawn theme | I can't change the height of Buy it now/ Add to card buttons

Hi guys,

I have two questions

  1. I attempted to change the size of the these buttons with these codes but they only worked with the width and nothing happened with the height. Why?
.product-form__submit, .shopify-payment-button {
   width: 90% !important;
   height: 70% !important;
}
  1. How to change the space (padding) between Add to card and Buy it now buttons?

My url: https://189ee3-2.myshopify.com/products/jacket

Thank you!

1 Like

Hey @collins276

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

hi i can you issue you want to increase the size of the button or increase the space between these button please conform once

Hi @collins276 , go to base.css and add the following code :

button.shopify-payment-button__button.shopify-payment-button__button--unbranded {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.product-form__submit {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    margin-bottom:2rem !important;
}

Result:

1 Like

Hi @collins276

Im not sure what do you like to achieve. You like to change the space between the two buttons? or change the heights? But anyway you can 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:

/* This is to change the space between two buttons. */
.product-form__submit {
    margin-bottom: 5px;
}
/* And this is to increase/decrease the size of the buttons. */
button.shopify-payment-button__button.shopify-payment-button__button--unbranded {
    padding: 0px;
}
.button, .shopify-challenge__button, .customer button, button.shopify-payment-button__button--unbranded {
    min-height: 3rem;
}

And save.

Result:

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

1 Like

Thank you! I asked both :grinning_face:

By the way, how can I resize the width? I replace ‘min-height’ with ‘min-width’ but it didn’t work.