Jump to content

How do I reduce padding between elements in product blocks?

Recommended Posts

Site URL: https://abba.squarespace.com/gallery

@tuanphan = King of CSS

Trying to tighten everything up on my store page... If you look at the image, I like how close the "quantity" and "add to cart" buttons are. Now I'd like the titles and prices to be spaced similarly. The image above each product block is a code block and not part of the product block. I'd like those to be closer as well (perhaps if I can edit the top and bottom padding for product blocks as well)

I have this pattern repeated hundreds of times, so hopefully it's code I can use site-wide. THANK YOU SO MUCH for your continued help. wow wow wow!

Screen Shot 2022-01-05 at 5.09.37 PM.png

Link to comment

Add to Design > Custom CSS

/* space quantity - price */
.product-block .productDetails .product-price {
    margin-bottom: 0px;
}
/* product title size mobile */
@media screen and (max-width:767px) {
a.product-title {
    font-size: 18px !important;
}
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
23 hours ago, elijah_aaron said:

@tuanphan THANK YOU AS ALWAYS! How do I target the add to cart button and the title of the product? I'd like to change attributes like size, color, and padding.

Thank you for always helping me. I can't tell you how much I appreciate it!

Use this code

a.product-title {
    color: red;
    font-size: 30px !important;
    line-height: 30px !important;
}
.product-block div.sqs-add-to-cart-button {
    background-color: red !important;
    border-color: red !important;
    color: white !important;
    padding-top: 20px !important;
    padding-bottom: 30px !important;
    padding-left: 30px !important;
    padding-right: 50px !important;
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.