Jump to content

Split grid gallery into 3 columns on mobile, Squarespace 7.1 Fluid Engine

Go to solution Solved by tuanphan,

Recommended Posts

Hello,

I am trying to make the galleries on my client's website (link) display in 3 columns rather than the default 2 in mobile.

I have tried various CSS fixes but they are not working. Perhaps because of fluid engine? And maybe because I am already targeting each grid gallery with the following code to eliminate mysterious mobile padding?

 

@media screen and (max-width:1025px) {
.fe-63ef599164b9221a9814c895 {
    grid-template-rows: repeat(6,minmax(calc(~"var(--container-width) * var(--row-height-scaling-factor)"), auto)) !important;
}
}

 

the .fe section targets the grid that the gallery is laid out on... I presume I have to add something to the code above to adjust the columns in mobile view but I am not sure what that is...  Solutions such as the one below have no effect. Even when I tried it on a test gallery that was not altered with the code above...

@media only screen and (max-width: 640px) {
  .gallery-grid-wrapper {
    grid-template-columns: 3fr !important;
    grid-gap: 20px !important;
  }
}

Would be very grateful for any ideas! 

Link to comment
  • 2 weeks later...
On 6/3/2023 at 11:16 PM, tuanphan said:

For this section?

image.thumb.png.24a3a0dec52672597dbc34bccae15876.png

Hi Tuanphan,

I'm sorry I didn't get a notification that you replied to my question! 

It wasn't for that section though. It was only for the grid galleries in the artist portfolio pages. Here's an example page.

In the desktop version, I have 6 columns which splits automatically into 2 columns in mobile. But my clients would rather this is split into 3 columns in mobile and I can't seem to work this out.

Would be very grateful for your help!

Link to comment
  • Solution
On 6/16/2023 at 12:06 AM, SourceProjects said:

Hi Tuanphan,

I'm sorry I didn't get a notification that you replied to my question! 

It wasn't for that section though. It was only for the grid galleries in the artist portfolio pages. Here's an example page.

In the desktop version, I have 6 columns which splits automatically into 2 columns in mobile. But my clients would rather this is split into 3 columns in mobile and I can't seem to work this out.

Would be very grateful for your help!

Add to Design > Custom CSS

/* Mobile Gallery 3 columns */
@media screen and (max-width:767px) {
div#block-5e8364c17d2f2766f79c .slide {
    width: 33.333% !important;
}
}

image.thumb.png.d779dc5cd2756f63e1a02ce73f26d014.png

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.