Guest Posted April 30, 2021 Posted April 30, 2021 Site URL: https://modernbusiness.squarespace.com Hey. Squarespace breaks this into one column on mobile. But I would like the images to display in two columns. I have a multiple pages of the same. Is there a way to do that?
tuanphan Posted May 1, 2021 Posted May 1, 2021 Add to Design > Custom CSS /* Products 2 columns */ @media screen and (max-width:767px) { div#block-yui_3_17_2_1_1618893896866_14059 ~ .row .span-3 { width: 50% !important; float: left !important; } div#block-yui_3_17_2_1_1618893896866_14059 ~ .row .span-3:nth-child(2n+1) { clear: left !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!)
Guest Posted May 1, 2021 Posted May 1, 2021 5 hours ago, tuanphan said: Add to Design > Custom CSS /* Products 2 columns */ @media screen and (max-width:767px) { div#block-yui_3_17_2_1_1618893896866_14059 ~ .row .span-3 { width: 50% !important; float: left !important; } div#block-yui_3_17_2_1_1618893896866_14059 ~ .row .span-3:nth-child(2n+1) { clear: left !important; } } Thank you.
Guest Posted May 2, 2021 Posted May 2, 2021 Hey @tuanphan. How can I make that it works on multiple pages? https://modernbusiness.squarespace.com/categories/accessories https://modernbusiness.squarespace.com/categories/toiletries etc. Basically, I have the same thing on numerous pages.
tuanphan Posted May 4, 2021 Posted May 4, 2021 On 5/2/2021 at 10:30 PM, kristobans said: Hey @tuanphan. How can I make that it works on multiple pages? https://modernbusiness.squarespace.com/categories/accessories https://modernbusiness.squarespace.com/categories/toiletries etc. Basically, I have the same thing on numerous pages. Each page needs a different code. If you use Summary or Gallery block, we can target easier with 1 code /* Mobile 2 columns products */ @media screen and (max-width:767px) { /* accessories */ div#block-yui_3_17_2_1_1619418261951_140576+.row .span-3 { width: 50% !important; float: left !important; } div#block-yui_3_17_2_1_1619418261951_140576+.row .span-3:nth-child(2n+1) { clear: left !important; } /* toiletries */ div#block-yui_3_17_2_1_1619424383691_34796+.row .span-3 { width: 50% !important; float: left !important; } div#block-yui_3_17_2_1_1619424383691_34796+.row .span-3:nth-child(2n+1) { clear: left !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!)
Guest Posted May 4, 2021 Posted May 4, 2021 5 hours ago, tuanphan said: Each page needs a different code. If you use Summary or Gallery block, we can target easier with 1 code /* Mobile 2 columns products */ @media screen and (max-width:767px) { /* accessories */ div#block-yui_3_17_2_1_1619418261951_140576+.row .span-3 { width: 50% !important; float: left !important; } div#block-yui_3_17_2_1_1619418261951_140576+.row .span-3:nth-child(2n+1) { clear: left !important; } /* toiletries */ div#block-yui_3_17_2_1_1619424383691_34796+.row .span-3 { width: 50% !important; float: left !important; } div#block-yui_3_17_2_1_1619424383691_34796+.row .span-3:nth-child(2n+1) { clear: left !important; } } Hey. Thank you. I've changed the code for each page. It's easier at this point.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.