Jump to content

How to make Cart Buttons margins smaller

Recommended Posts

Hi,

I have rearranged my add to cart buttons, but I cannot manage to make the margins smaller between the buttons. I input margin values both negative and positive and they dont do anything. Can anyone help? Right now I have the following code in my Custom CSS.

 

/* cart buttons order */
#productDetails {
    display: flex;
    flex-direction: column;
}

h1.product-title {
    order: 1;
    margin-top: 0; /* Adjust as needed */
    padding-top: 0; /* Adjust as needed */
}

.product-price {
    order: 2;
    margin-top: -10; /* Adjust as needed */
}

.sqs-add-to-cart-button-wrapper {
    order: 3;
    margin-top: -20px; /* Adjust as needed */
    padding-top: 0; /* Adjust as needed */
}

.product-quantity-input {
    order: 4;
    margin-bottom: -10px; /* Adjust as needed */
}

.product-variants {
    order: 5;
  padding-top: -10;
}

.product-excerpt {
    order: 6;
    padding-bottom: 0; /* Adjust as needed */
}

.product-sharing {
    order: 7;
    padding-bottom: 0; /* Adjust as needed */
}

Edited by 2Eyeballs
Link to comment
  • Replies 3
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Can you share your website URL so I can look at where the margin is coming from?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Add this Custom CSS for the add to cart button:

.sqs-add-to-cart-button-wrapper .sqs-add-to-cart-button {
    margin: 0px;
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

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.