How can I center the quantity button in Craft Theme?

Hello,

I use Craft Theme for www.hopethestudio.com and want to centre the quantity button aligning with rest of product info as shown on photo. What can I do?

@LitExtension @KetanKumar maybe you have any ideas?

1 Like

@Mimi111

oh sorry for that issue can you please try this code

  1. Go to Online Store->Theme->Edit code
  2. Asset->/base.css ->paste below code at the bottom of the file.
.product-form__quantity {text-align: center;}
.product-form__quantity .quantity {margin: 0px auto;}

Hi @Mimi111

This is Victor from PageFly - Shopify Page Builder App, I’d like to suggest this idea:

Add this CSS at the bottom

Online Store ->Theme ->Edit code

Assets ->base.css

.product-form__input.product-form__quantity {
    text-align: center !important;
}
.quantity {
    margin: auto !important;
}

Hope you find my answer helpful!

Best regards,

Victor | PageFly

Hello @Mimi111 ,

It’s GemPages support team and glad to support you today.

I would like to give you the recommendation to support you so kindly follow the steps below:

  1. Go to Online Store > Theme > Edit code of your current theme

  1. Open your theme.liquid theme file

  2. Paste the below code before


If you require any further information, feel free to contact me.

Best regards,
GemPages Support Team

Hi @KetanKumar and @PageFly-Victor for both your solutions this is what happens:

The Quantity Button comes a bit more centred but not exactly in the middle, any suggestions? Thank you!!

Hi @GemPages , this worked so far, thank you. But now the “ad to chart” and “buy with” aren’t centred. How can I get them centred too?

Thank you!

Hi @Mimi111 ,

Please go to Actions > Edit code > Assets > section-main-product.css file and paste this at the bottom of the file:

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

Hope it helps!

Hello @Mimi111

Add this CSS at the bottom

Online Store ->Theme ->Edit code

Assets ->base.css

.product-form__buttons {
margin: auto !important;

}

Hello @Mimi111 ,

You could please try adding the below code before in the theme.liquid file


Best regards,
GemPages Support Team

Worked excellent, thank you so much!

1 Like

I am so glad that my solution can help.

Best regards,
GemPages Support Team