Jump to content

Different height of gallery on mobile and desktop

Recommended Posts

Site URL: https://harmonica-vibraphone-jwpe.squarespace.com/

Hi 

I've set up a gallery in a section on my homepage, and the desktop images I'd like to be set to Large on height, but on mobile view I'd prefer it to be Medium (the framing is much better this way).   Is there a way to do this via custom css?  I'm not really concerned about picking out a specific block with a specific gallery I'd be happy for all galleries to follow this sizing if that's easier. 

Sam

Link to comment
  • Replies 4
  • Views 420
  • Created
  • Last Reply

Top Posters In This Topic

On 10/25/2021 at 9:24 PM, Futuresound said:

Site URL: https://harmonica-vibraphone-jwpe.squarespace.com/

Hi 

I've set up a gallery in a section on my homepage, and the desktop images I'd like to be set to Large on height, but on mobile view I'd prefer it to be Medium (the framing is much better this way).   Is there a way to do this via custom css?  I'm not really concerned about picking out a specific block with a specific gallery I'd be happy for all galleries to follow this sizing if that's easier. 

Sam

Add to Design > Custom CSS > then save & reload the site

@media screen and (max-width:767px) {
body.homepage .gallery-fullscreen-slideshow {
    height: 40vh !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.