ssteart Posted April 2, 2021 Share Posted April 2, 2021 I am using Squarespace 7.1 to build my website and I would like the photos on my gallery page to display as a masonry grid of three columns. All good until this point. The problem is that by doing so the grid on mobile changes to two columns which is very uncomfortable on a phone. Is there a way to change the grid to one column just on mobile while keeping 3 columns on a desktop? It would be awesome if I could also activate lightbox for desktop while keeping it inactive for mobile, though that's not essential. Thank you! Link to comment
tuanphan Posted April 10, 2021 Share Posted April 10, 2021 Hi. Add to Design > Custom CSS /* Masonry one item on mobile */ @media screen and (max-width:767px) { .gallery-masonry-wrapper.gallery-masonry-list--ready { height: auto !important; } figure.gallery-masonry-item { position: relative !important; width: 100% !important; transform: unset !important; } .gallery-masonry-item-wrapper { height: auto !important; } .gallery-masonry .gallery-masonry-item[data-loaded] img { width: 100% !important; } .gallery-masonry { padding-left: 0 !important; padding-right: 0 !important; } } Photograffix 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
supermatic123 Posted July 15, 2021 Share Posted July 15, 2021 I have used this code and it works perfectly, thank you. How about if I want to have a margin between the items (at the moment they are all touching with no margin / padding?) Link to comment
tuanphan Posted July 17, 2021 Share Posted July 17, 2021 On 7/15/2021 at 6:16 PM, supermatic123 said: I have used this code and it works perfectly, thank you. How about if I want to have a margin between the items (at the moment they are all touching with no margin / padding?) Hi. Can you share link to gallery on your site? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
beardandglasses Posted January 15, 2022 Share Posted January 15, 2022 (edited) @tuanphan I am having a similar issue. The code above works perfectly, however I would like to add padding between each item vertically. Currently there is padding on the left and right of each image on mobile, but the images stack vertically on top of each other top edge to bottom edge with no padding. The site is currently password protected but I can share a screen grab here. Notice the blue image has no padding between itself and the orange image. Please note they are images (text is in the image): Appreciate the help. Edited January 15, 2022 by beardandglasses Link to comment
tuanphan Posted January 16, 2022 Share Posted January 16, 2022 On 1/15/2022 at 10:22 PM, beardandglasses said: @tuanphan I am having a similar issue. The code above works perfectly, however I would like to add padding between each item vertically. Currently there is padding on the left and right of each image on mobile, but the images stack vertically on top of each other top edge to bottom edge with no padding. The site is currently password protected but I can share a screen grab here. Notice the blue image has no padding between itself and the orange image. Please note they are images (text is in the image): Appreciate the help. Try changing this line .gallery-masonry-item-wrapper { height: auto !important; } to this .gallery-masonry-item-wrapper { height: auto !important; margin-bottom: 20px !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
henriquepisidoro Posted February 27 Share Posted February 27 After using this code to have only 1 row on masonry gallery on mobile view: /* Masonry one item on mobile */ @media screen and (max-width:767px) { .gallery-masonry-item-wrapper { height: auto !important; margin-bottom: 30px !important; } figure.gallery-masonry-item { position: relative !important; width: 100% !important; transform: unset !important; } .gallery-masonry-item-wrapper { height: auto !important; } .gallery-masonry .gallery-masonry-item[data-loaded] img { width: 100% !important; } .gallery-masonry { padding-left: 10 !important; padding-right: 10 !important; } } The Button "Next" started showing in the middle of the gallery instead of being on the bottom before the footer. Also the footer disapeared. The link to the page is: https://www.henriqueisidoro.com/osloapparel Link to comment
tuanphan Posted March 5 Share Posted March 5 I see you solved with new code? @media screen and (max-width: 767px) { .gallery-masonry-item-wrapper { height:auto !important; margin-bottom: 30px !important } figure.gallery-masonry-item { position: relative !important; width: 100% !important; transform: unset !important } .gallery-masonry-item-wrapper { height: auto !important } .gallery-masonry .gallery-masonry-item[data-loaded] img { width: 100% !important } .gallery-masonry { padding-left: 10 !important; padding-right: 10 !important } .gallery-masonry-wrapper.gallery-masonry-list--ready { height: auto !important } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
ahmadtaha Posted April 7 Share Posted April 7 Hi, ive been searching the whole forum. How i can set the masonary grid to 3 column in mobile view while keeping the same 0px gaps between images as in the desktop view. also how can i make more than one column for the projects mobile view in a portfolio page ? as you can see i applied the code below i found on another thread but it totally dismantle the initial design.@media screen and (max-width:640px) { figure.gallery-masonry-item { width: 33.3% !important; float: left !important; transform: unset !important; position: initial !important; display: block!important; padding: 0px!important; box-sizing: border-box; } figure.gallery-masonry-item img { width: 100% !important; } .gallery-masonry-item-wrapper { height: auto !important; } } my website : https://ahmadtaha.com/ Link to comment
tuanphan Posted April 8 Share Posted April 8 On 4/7/2023 at 5:19 PM, ahmadtaha said: Hi, ive been searching the whole forum. How i can set the masonary grid to 3 column in mobile view while keeping the same 0px gaps between images as in the desktop view. also how can i make more than one column for the projects mobile view in a portfolio page ? as you can see i applied the code below i found on another thread but it totally dismantle the initial design.@media screen and (max-width:640px) { figure.gallery-masonry-item { width: 33.3% !important; float: left !important; transform: unset !important; position: initial !important; display: block!important; padding: 0px!important; box-sizing: border-box; } figure.gallery-masonry-item img { width: 100% !important; } .gallery-masonry-item-wrapper { height: auto !important; } } my website : https://ahmadtaha.com/ You try checking on live mode. It looks fine to me Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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