Jump to content

Change homepage gallery on mobile view only?

Go to solution Solved by Beyondspace,

Recommended Posts

Posted

Hello, hoping I can find out if there is a way to have two different galleries for the homepage. One for Desktop view and one for Mobile view? Specifically changing which photos are cycled through on each. Thanks!

www.lillytaylorinteriors.com

Posted
10 hours ago, notnothing said:

Hello, hoping I can find out if there is a way to have two different galleries for the homepage. One for Desktop view and one for Mobile view? Specifically changing which photos are cycled through on each. Thanks!

www.lillytaylorinteriors.com

You can create 2 slideshow sections and we can use css to either hide on of them based on screen size

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

  • Solution
Posted

1. Hide Section A on Mobile (Show by default on Desktop)

/* Hide Section A on Mobile */
@media only screen and (max-width: 767px) {
    [section-a] {
        display: none;
    }
}
 

2. Hide Section B on Desktop (Show by default on Mobile)

/* Hide Section B on Desktop */
@media only screen and (min-width: 768px) {
    [section-b] {
        display: none;
    }
}

This setup ensures that:

  • SectionA is hidden on mobile but visible on desktop.
  • SectionB is hidden on desktop but visible on mobile.

Replace [section-b] or [section-a] by inspecting the section identifier using this Chrome plugin

image.thumb.png.969292be55b51f206465fb1931bc344c.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted

Thank you so much! 

11 hours ago, Beyondspace said:

1. Hide Section A on Mobile (Show by default on Desktop)

/* Hide Section A on Mobile */
@media only screen and (max-width: 767px) {
    [section-a] {
        display: none;
    }
}
 

2. Hide Section B on Desktop (Show by default on Mobile)

/* Hide Section B on Desktop */
@media only screen and (min-width: 768px) {
    [section-b] {
        display: none;
    }
}

This setup ensures that:

  • SectionA is hidden on mobile but visible on desktop.
  • SectionB is hidden on desktop but visible on mobile.

Replace [section-b] or [section-a] by inspecting the section identifier using this Chrome plugin

image.thumb.png.969292be55b51f206465fb1931bc344c.png

Thank you so much! I will create another gallery and add these codes! @Beyondspace

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.