sophiamd57 Posted February 10, 2022 Share Posted February 10, 2022 Site URL: https://crytime.art/shop Hi there! I'd like to get rid the the space between my product description and the "extra info" on my product page for mobile. I understand in concept how I can do this coding, but I don't know exactly what code to put in. Thank! Link to comment
Solution paul2009 Posted February 10, 2022 Solution Share Posted February 10, 2022 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: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
sophiamd57 Posted February 10, 2022 Author Share Posted February 10, 2022 Thank you again Paul, that worked perfectly! Link to comment
jackweinstein Posted April 18 Share Posted April 18 (edited) 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. Edited April 18 by jackweinstein Link to comment
paul2009 Posted April 18 Share Posted April 18 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: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment