Jump to content

Custom code for two-column product view on Smartphone

Go to solution Solved by paul2009,

Recommended Posts

Hi everyone,

I would like to change the mobile view of my store. Since we offer many products, we would like to have two columns of products displayed in the mobile view and not one as set by Squarespace. Unfortunately this is not so easy to change as thought and my programming skills are not sufficient for this, so I wanted to ask if anyone here knows how I can solve this quickly and easily. 

Thank you,
Stefanie

Link to comment

You can try adding this code to Design > Custom CSS (or Website > Website Tools > Custom CSS)

/* Product 2 columns mobile */
@media screen and (max-width:767px) {
    .products.collection-content-wrapper .list-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-column-gap: 10px;
}
}

 

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!)

Link to comment
On 8/16/2023 at 1:11 PM, tuanphan said:

You can try adding this code to Design > Custom CSS (or Website > Website Tools > Custom CSS)

/* Product 2 columns mobile */
@media screen and (max-width:767px) {
    .products.collection-content-wrapper .list-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-column-gap: 10px;
}
}

 

Thank you so much - it worked 🥳

Link to comment
  • 4 weeks later...
  • Solution
On 8/14/2023 at 12:16 PM, StefanieR said:

I would like to change the mobile view of my store. Since we offer many products, we would like to have two columns of products displayed in the mobile view and not one as set by Squarespace. Unfortunately this is not so easy to change as thought and my programming skills are not sufficient for this, so I wanted to ask if anyone here knows how I can solve this quickly and easily. 

You no longer need code to achieve this because Squarespace added this as a feature to Squarespace 7.1 in September 2023.

To access this feature, go to your Store page and click Edit

Put the preview into Mobile View and then click Edit Section. You’ll be able to update your column layout to two columns instead of one.

image.thumb.png.d6b112d40e1c0b8212adf3295452c8de.png

 

Note that this setting only affects the style of the mobile page. You can change the column layout for the desktop layout by putting the preview into Desktop View

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.