martelil Posted October 17, 2022 Posted October 17, 2022 (edited) Hi everyone, I have a gallery section; a masonry grid with two columns, and would like to override the gutter between the columns. In the edit section box it can be set to a maximum of 150 but I want even more space. I managed to increase the inset of the section using the code below – thanks @tuanphan But I need help to remove the extra inset on mobile. Also, is it possible to have just one column on mobile? Thanks for any help! Marte /* Gallery section - Masonry padding */ .gallery-masonry { padding-left: 10vw !important; padding-right: 10vw !important; } Edited October 17, 2022 by martelil
Ziggy Posted October 17, 2022 Posted October 17, 2022 Can you share the URL of the page you are trying to do this on? 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
martelil Posted October 17, 2022 Author Posted October 17, 2022 https://www.ucrf.oglilleby.no/home-gallery PW: UCRF-test
Ziggy Posted October 17, 2022 Posted October 17, 2022 This will mean the padding only applies to desktop: /* Gallery section - Masonry padding */ @media only screen and (min-width:750px) { .gallery-masonry { padding-left: 10vw !important; padding-right: 10vw !important; } } tuanphan 1 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! 📈 SEO Space (Referral link) Ⓜ️ Will Myers' Plugins & Tutorials (Referral link) 🔌 Ghost Squarespace Plugins (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee?
martelil Posted October 17, 2022 Author Posted October 17, 2022 (edited) Thanks @Ziggy that worked! Now I just need to have only one column on mobile. Plus add the spacing between columns on desktop. Do you have a clue? Edited October 17, 2022 by martelil
tuanphan Posted October 22, 2022 Posted October 22, 2022 On 10/18/2022 at 4:39 AM, martelil said: that worked! Now I just need to have only one column on mobile. Plus add the spacing between columns on desktop. Do you have a clue? To change to one column on mobile, add this CSS /* Masonry to grid mobile */ @media screen and (max-width:767px) { .gallery-masonry-wrapper.gallery-masonry-list--ready { height: auto !important; display: grid; grid-template-columns: repeat(1,1fr) !important; grid-column-gap: 10px; grid-row-gap: 10px; } figure.gallery-masonry-item { position: relative !important; width: 100% !important; transform: unset !important; } .gallery-masonry-item-wrapper { height: 100% !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!)
martelil Posted October 24, 2022 Author Posted October 24, 2022 Thank you, that worked perfect @tuanphan! Can you help med with overriding the max default 150 gutter between the two columns in the masonry grid as well?
tuanphan Posted October 27, 2022 Posted October 27, 2022 On 10/24/2022 at 4:11 PM, martelil said: Thank you, that worked perfect @tuanphan! Can you help med with overriding the max default 150 gutter between the two columns in the masonry grid as well? On mobile or desktop? With desktop, have you tried adjusting this yet? 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!)
martelil Posted October 28, 2022 Author Posted October 28, 2022 Yes I set it to max 150 on desktop, but I'm looking for an even bigger spacing between the columns. Mobile works fine with the code for one column.
tuanphan Posted October 31, 2022 Posted October 31, 2022 On 10/18/2022 at 12:18 AM, martelil said: https://www.ucrf.oglilleby.no/home-gallery PW: UCRF-test The url doesn't work now. Can you check it again? 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!)
martelil Posted October 31, 2022 Author Posted October 31, 2022 (edited) Oh I'm sorry, changed the URL to this: https://www.ucrf.oglilleby.no/home-gallery-copy Edited November 7, 2022 by martelil
tuanphan Posted November 4, 2022 Posted November 4, 2022 On 10/31/2022 at 9:13 PM, martelil said: Oh I'm sorry, changed the URL to this: https://www.ucrf.oglilleby.no/home-gallery-copy Thank you. But I Just checked, no way to control this with code. 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!)
martelil Posted November 7, 2022 Author Posted November 7, 2022 (edited) Thanks anyway, then I know. Edited November 7, 2022 by martelil
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment