Jump to content

How to Center 'add to cart' button in product description

Recommended Posts

Site URL: https://www.intro-verso.com/all-new-products

Hello,

 

I'd like to move my Add To Cart button (which I changed the text of to 'contact to purchase') to the center of the text block.

At the moment it is alligned left, just like the text which looks messy espacially on mobile view. However I don't see an option to manually do this, is there a code to make this change?

 

Any help is much appreciated!

Screen Shot 2021-11-09 at 12.05.07.png

Screen Shot 2021-11-09 at 12.05.31.png

Link to comment
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

4 hours ago, Mathias654321 said:

Site URL: https://www.intro-verso.com/all-new-products

Hello,

 

I'd like to move my Add To Cart button (which I changed the text of to 'contact to purchase') to the center of the text block.

At the moment it is alligned left, just like the text which looks messy espacially on mobile view. However I don't see an option to manually do this, is there a code to make this change?

 

Any help is much appreciated!

Screen Shot 2021-11-09 at 12.05.07.png

Screen Shot 2021-11-09 at 12.05.31.png

You can try adding to Home > Design > Custom Css

.sqs-add-to-cart-button-wrapper {
  text-align:center;
}

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

My testing result

image.thumb.png.9410b1eef90654cdda08e756474fdb5b.png

On desktop

image.png.26653c15303d22809df303d7f40da210.png

On Mobile

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
On 11/10/2021 at 4:30 PM, Mathias654321 said:

This works well, thank you very much!

Is there a way to only implement this on mobile view, and keep the button alligned left for desktop view?

That would be my ideal setup.

 

Appreciate your time

Try wrap the code in media query.

First, remove above code & use this code

@media screen and (max-width:640px) {
.sqs-add-to-cart-button-wrapper {
  text-align:center;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 months later...

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.