Jump to content

Center Add To Cart Button on specific page

Go to solution Solved by tuanphan,

Recommended Posts

I used the following code (add via Page Header Code Injection) to change the size and center-align the Add To Cart button

// Reduce size of Add To Cart button & centre //
<style>
.sqs-add-to-cart-button {
    padding-top: 15px !important;
  	padding-bottom: 15px !important;
}
.sqs-add-to-cart-button-wrapper {
  	margin: 0 auto;
  	text-align: center !important;
}
 </style>

Works well here: https://www.adamblyth.com.au/2025-calendar  password: testtest

However, when I click on the image to see more details of the product, the Add To Cart button is also centre aligned.  I'd like that button to remain left aligned:

https://www.adamblyth.com.au/2025-calendar/p/style-01-ej5na-xd9rg

 

Screenshot 2024-08-10 204046.jpg

Edited by AdamBlyth
Link to comment
  • Replies 1
  • Views 690
  • Created
  • Last Reply

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.