RichardL26 Posted January 14, 2022 Share Posted January 14, 2022 Site URL: https://www.richardalam.com/ Hello, hoping someone can help me with some CSS. I have a summary block with images on my homepage, and I'd like it to display as two columns on mobile. I've tried a few different code blocks on these forums, but none have worked as intended. Here's the link: https://www.richardalam.com/ Thank you in advance! Link to comment
tuanphan Posted January 15, 2022 Share Posted January 15, 2022 On 1/14/2022 at 9:17 AM, RichardL26 said: Site URL: https://www.richardalam.com/ Hello, hoping someone can help me with some CSS. I have a summary block with images on my homepage, and I'd like it to display as two columns on mobile. I've tried a few different code blocks on these forums, but none have worked as intended. Here's the link: https://www.richardalam.com/ Thank you in advance! Add to Design >Custom CSS /* Mobile-Homepage-Summary 2 columns */ @media screen and (max-width:767px) { body.homepage .summary-item-list { display: grid !important; grid-template-columns: repeat(2,1fr); height: auto !important; grid-column-gap: 20px; grid-row-gap: 20px; } body.homepage .summary-item { position: relative !important; top: unset !important; left: unset !important; right: unset !important; bottom: unset !important; width: 100% !important; 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
RichardL26 Posted January 17, 2022 Author Share Posted January 17, 2022 (edited) On 1/15/2022 at 3:13 AM, tuanphan said: Add to Design >Custom CSS /* Mobile-Homepage-Summary 2 columns */ @media screen and (max-width:767px) { body.homepage .summary-item-list { display: grid !important; grid-template-columns: repeat(2,1fr); height: auto !important; grid-column-gap: 20px; grid-row-gap: 20px; } body.homepage .summary-item { position: relative !important; top: unset !important; left: unset !important; right: unset !important; bottom: unset !important; width: 100% !important; height: auto !important; } } Thank you, that worked! However, now I have a different issue. There is a big gap because of the different photo orientations (see attached screenshot). Is there a way to stagger the photos? Here's an example site that does that (albeit not using Squarespace): https://www.andrewtkearns.com/ Edited January 17, 2022 by RichardL26 Link to comment
tuanphan Posted January 19, 2022 Share Posted January 19, 2022 They have different size, so when coverting to grid, it will have problem like as above. You can remove the code, we will test some new code RichardL26 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
RichardL26 Posted January 25, 2022 Author Share Posted January 25, 2022 On 1/19/2022 at 1:03 AM, tuanphan said: They have different size, so when coverting to grid, it will have problem like as above. You can remove the code, we will test some new code Removed the code! Any updates on new code? 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