How can I center the 'Add to Cart' button in Minimal theme?

Hi,

I am trying to add a button “Add to cart”

But whenever I add the coding in it is not centred. Is anyone able to help please. The code below is what I am using but cannot seem to get it centred. I have also attached a picture so you can see that it is not centred or aligned.

1 Like

@NikkiJ

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

@KetanKumar Hi, Thank you I have sent you a message as my site is not live yet and password protected

1 Like

@NikkiJ

thanks, can you please try this code

  1. Go to Online Store->Theme->Edit code
  2. Asset->/timber.scss.liquid->paste below code at the bottom of the file.
.grid-link + form {text-align: center;}
1 Like

@KetanKumar thank you - I think we are almost there. Do you know why some maybe not be aligned on the same line. Screen shot provided below as example ( image 3 )

1 Like

@NikkiJ

yes, please share again url

@NikkiJ

yes, please use this code

.grid-link__title {min-height: 44px;}

@KetanKumar Thank you - one slight issue the products that have a customer review they do not align. Picture attached. The rows without rating are aligned but not these. What would you suggest in this case please ?

@NikkiJ

yes it can be done custom code change backend

@KetanKumar are you able to help with this or not ?

Thanks

@NikkiJ

yes, please share code so i will update