reddribbon1 Posted February 14, 2023 Share Posted February 14, 2023 Hi, I've just recently developed a site on Squarespace and was wondering if there was a way to add a custom code which allowed for there to be 4 images of products going across on the desktop version, and 2 on the mobile version. At the moment I have a code which is allowing 2 products per line on the product page, but for the desktop site, this is too big. However, for the mobile site this is fine Link to comment
reddribbon1 Posted February 14, 2023 Author Share Posted February 14, 2023 This is the code I am using at the moment: <style> /* Product 2 columns mobile */ @media screen and (max-width:767px) { .products.collection-content-wrapper .list-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-column-gap: 10px; } Link to comment
tuanphan Posted February 15, 2023 Share Posted February 15, 2023 Hi, What is your site url? 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
reddribbon1 Posted February 15, 2023 Author Share Posted February 15, 2023 www.redribbonfashion.co.uk Link to comment
tuanphan Posted February 17, 2023 Share Posted February 17, 2023 On 2/15/2023 at 3:58 PM, reddribbon1 said: www.redribbonfashion.co.uk Hi, On this page & other category page? https://www.redribbonfashion.co.uk/readytowear/new-arrivals?tag=New Arrivals Chane to 4 images/row (Desktop) and 2 on mobile? 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
reddribbon1 Posted February 17, 2023 Author Share Posted February 17, 2023 Hiya, 5 hours ago, tuanphan said: Hi, On this page & other category page? https://www.redribbonfashion.co.uk/readytowear/new-arrivals?tag=New Arrivals Chane to 4 images/row (Desktop) and 2 on mobile? Yes - would like to do it on all pages ideally. The images are too large for desktop view but just right for mobile view Link to comment
Solution tuanphan Posted February 20, 2023 Solution Share Posted February 20, 2023 On 2/17/2023 at 9:00 PM, reddribbon1 said: Hiya, Yes - would like to do it on all pages ideally. The images are too large for desktop view but just right for mobile view Add to Design > Custom CSS .products.collection-content-wrapper .list-grid { grid-template-columns: repeat(4,1fr) !important; } @media screen and (max-width:767px) { .products.collection-content-wrapper .list-grid { grid-template-columns: repeat(2,1fr) !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
reddribbon1 Posted February 22, 2023 Author Share Posted February 22, 2023 That worked! Thank you very much 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