Jump to content

Edit image gallery for mobile only

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Site password: Passion

I have an image gallery across our home page and I like how it looks for desktop, but for mobile it does not look right. One image is below the others, and if I change the gallery type from strips to another that looks better, like masonry, it updates it for mobile and desktop.

I either need to change the image gallery type for mobile only or find a way to make the gallery strip look good on mobile as well.

image.thumb.png.c5cc30ad1e7c1854e90d85e3f3dd6f7c.png

image.thumb.png.4cb66ecf79b37caf7cef0826377978c9.png

  • Solution
Posted

You can add this to Design > Custom CSS

/* Gallery strips 2 columns mobile */
@media (max-width: 576px) {
    .gallery-strips .gallery-strips-wrapper {
        columns: 2;
        column-gap: 0;
        height: auto!important;
        display: block!important;
        padding: 0 5px;
    }
    .gallery-strips-item-wrapper {
        height: auto!important;
    }
    .gallery-strips-item {
        position: relative!important;
        transform: none!important;
        width: 100%!important;
        display: block;
        padding: 5px!important;
        box-sizing: border-box;
    }

    .gallery-strips .gallery-strips-item img {
        height: 100%!important;
      	width: 100%!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!)

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.