Trinfluential Posted September 24, 2023 Share Posted September 24, 2023 Hello, I'd like a code to make my product page have 3 columns for desktop view and 2 columns for mobile view. I'm currently using the code below right now. It shows the 3 columns for desktop view in editor, but once I save it there's only 2 columns for both desktop view and mobile view. @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: 30px; grid-row-gap: 0px; padding: 0; } Link to comment
Solution Web_Solutions Posted September 24, 2023 Solution Share Posted September 24, 2023 33 minutes ago, Trinfluential said: Hello, I'd like a code to make my product page have 3 columns for desktop view and 2 columns for mobile view. I'm currently using the code below right now. It shows the 3 columns for desktop view in editor, but once I save it there's only 2 columns for both desktop view and mobile view. @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: 30px; grid-row-gap: 0px; padding: 0; } Remove your code and add the code below on Custom CSS panel in Website > Utilities > Website Tools > Custom CSS. .products.collection-content-wrapper .list-grid { display: grid; grid-template-columns: repeat(3,minmax(~"0, 1fr")) !important; grid-column-gap: 30px !important; grid-row-gap: 30px !important; @media screen and (max-width: 767px) { grid-template-columns: repeat(2,minmax(~"0, 1fr")) !important; grid-row-gap: 0px !important; } } Trinfluential, Ainul and yerim-amuhi87 3 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Trinfluential Posted September 24, 2023 Author Share Posted September 24, 2023 That worked! Thank you so much Link to comment
creedon Posted September 24, 2023 Share Posted September 24, 2023 You no longer need to use code to get two columns on mobile. There is now a setting for this. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Kinreu Posted May 1 Share Posted May 1 @creedon actually when you do that, it applies also to the desktop style. There is no differenciation on the back end if you change on the desktip size it will apply the same on the mobile style. Link to comment
creedon Posted May 2 Share Posted May 2 1 hour ago, Kinreu said: actually when you do that, it applies also to the desktop style. There is no differenciation on the back end if you change on the desktip size it will apply the same on the mobile style. Not in my experience. store page desktop mobile independant column settings.mp4 And we can see the CSS changing in the code. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Kinreu Posted May 2 Share Posted May 2 okay, so probably just a problem with image gallery items. 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