Jump to content

How to get rid of this open space on my product page? (Mobile)

Go to solution Solved by paul2009,

Recommended Posts

  • Replies 5
  • Views 561
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution
14 minutes ago, sophiamd57 said:

I'd like to get rid the the space between my product description and the "extra info" on my product page for mobile.

You can do this with some CSS.

By default, there are 40 pixels of margin at the bottom of the Product Excerpt section and then another 5vw units of margin on top of the Additional Info section. To reduce the whitespace you can reduce one or both of these to meet your requirements. I've set them both to zero in this example CSS:

@media only screen and (max-width: 799px) {
    .ProductItem-details .ProductItem-details-excerpt {
        margin-bottom: 0; //40px
    }
    .ProductItem .ProductItem-additional {
        margin-top: 0; //5vw
    }
}

 

Notes:
1. This is for Squarespace 7.1.
2. This uses a media query so that it only applies to mobile devices (devices with a screen width of 799px or smaller).
3. CSS should be added to Design > Custom CSS.

About me: I'm Paul. A SQSP User for 18 yrs, I joined Circle when it launched in 2016 and have been a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing expertise and extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee fuels my work.

Book paid help with a Squarespace Domain

Link to comment
  • 1 year later...
On 2/10/2022 at 9:24 AM, paul2009 said:

You can do this with some CSS.

By default, there are 40 pixels of margin at the bottom of the Product Excerpt section and then another 5vw units of margin on top of the Additional Info section. To reduce the whitespace you can reduce one or both of these to meet your requirements. I've set them both to zero in this example CSS:

@media only screen and (max-width: 799px) {
    .ProductItem-details .ProductItem-details-excerpt {
        margin-bottom: 0; //40px
    }
    .ProductItem .ProductItem-additional {
        margin-top: 0; //5vw
    }
}

 

Notes:
1. This is for Squarespace 7.1.
2. This uses a media query so that it only applies to mobile devices (devices with a screen width of 799px or smaller).
3. CSS should be added to Design > Custom CSS.

Hi, @paul2009 I used the above code and it also worked for me to eliminate the space between the product description and the extra info section. However, I have some additional spacing between the product name and product description because I've hidden the price and quantity fields and buy button because my client doesn't want to sell their products online, only showcase them (they sell offline). Anyway, I assume I can't eliminate that space since I've hidden those elements but wanted to see if there was a way with CSS that you could share? Thanks.

Here's the page on my site linked below https://cowbell-porpoise-zcj5.squarespace.com/product-pages/p/low-viscosity-polyurethane-resin and the password is concrete.

Screen Shot 2023-04-18 at 1.03.51 PM.png

Edited by jackweinstein
Link to comment
2 hours ago, jackweinstein said:

I have some additional spacing between the product name and product description because I've hidden the price and quantity fields and buy button because my client doesn't want to sell their products online

The spacing is just the 25px of bottom margin on the Product Title and the 25px of bottom margin on the Product Price. You should be able to remove both with CSS if required, for example:

.ProductItem-details h1.ProductItem-details-title, .ProductItem-details .ProductItem-product-price {
  margin-bottom: 0;
}

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I'm Paul. A SQSP User for 18 yrs, I joined Circle when it launched in 2016 and have been a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing expertise and extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee fuels my work.

Book paid help with a Squarespace Domain

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.