Jump to content

Image grid on desktop and mobile

Go to solution Solved by tuanphan,

Recommended Posts

Hi, I've just recently developed a site on Squarespace and was wondering if there was a way to add a custom code which allowed for there to be 4 images of products going across on the desktop version, and 2 on the mobile version. At the moment I have a code which is allowing 2 products per line on the product page, but for the desktop site, this is too big. However, for the mobile site this is fine

Link to comment
  • Replies 7
  • Views 630
  • Created
  • Last Reply

Top Posters In This Topic

On 2/15/2023 at 3:58 PM, reddribbon1 said:

www.redribbonfashion.co.uk

Hi,

On this page & other category page? https://www.redribbonfashion.co.uk/readytowear/new-arrivals?tag=New Arrivals

Chane to 4 images/row (Desktop) and 2 on mobile?

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
  • Solution
On 2/17/2023 at 9:00 PM, reddribbon1 said:

Hiya, 

Yes - would like to do it on all pages ideally. The images are too large for desktop view but just right for mobile view

Add to Design > Custom CSS

.products.collection-content-wrapper .list-grid {
    grid-template-columns: repeat(4,1fr) !important;
}
@media screen and (max-width:767px) {
    .products.collection-content-wrapper .list-grid {
    grid-template-columns: repeat(2,1fr) !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!)

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.