Jump to content

Masonry Grid Hover Captions

Go to solution Solved by Beyondspace,

Recommended Posts

 

Hi, all. I asked this last week in a resolved thread and am thinking maybe I need to create a new post ...

I have experimented with various versions of CSS code to implement a hover caption on masonry grids in 7.1. Had best luck with code in this thread, but I have a couple issues -- 

  • when I am not hovering over image, I can see a faint/small version of the caption on the image (see screenshot)
  • Mobile - I know hover doesn't work on mobile screens. Struggling to figure out  CSS so that always displays caption (beneath image) on mobile. 
     
I am using Masonry Grid in portfolio pages.
angelaart.net/work
pw angela
 
Any advice for how to tweak my css to resolve these things?
Thanks for any help you can offer!
Christine
 
 
61584cc4-a938-4c84-aec0-69ff1d6727b0.png
Edited by christined
Link to comment
  • Solution
7 hours ago, christined said:

 

Hi, all. I asked this last week in a resolved thread and am thinking maybe I need to create a new post ...

I have experimented with various versions of CSS code to implement a hover caption on masonry grids in 7.1. Had best luck with code in this thread, but I have a couple issues -- 

  • when I am not hovering over image, I can see a faint/small version of the caption on the image (see screenshot)
  • Mobile - I know hover doesn't work on mobile screens. Struggling to figure out  CSS so that always displays caption (beneath image) on mobile. 
     
I am using Masonry Grid in portfolio pages.
angelaart.net/work
pw angela
 
Any advice for how to tweak my css to resolve these things?
Thanks for any help you can offer!
Christine
 
 
61584cc4-a938-4c84-aec0-69ff1d6727b0.png

For desktop view, you can try the following code

@media only screen and (min-width: 768px) {
  .gallery-masonry-item .gallery-caption-content {
    visibility: hidden;
  }
  .gallery-masonry-item:hover .gallery-caption-content {
    visibility: visible;
  }
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.31fe12e52000c9e328844ff6eeae745f.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

For the mobile, you can try the following Css code

@media only screen and (max-width: 767px) {
  .gallery-masonry-item-wrapper {
    height: auto !important;
  }
  .gallery-masonry-wrapper.gallery-masonry-list--ready {
    display: flex;
    flex-wrap: wrap;
    height: auto !important;
  }
  figure.gallery-masonry-item {
    position: relative !important;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    transform: unset !important;
  }
  .gallery-caption-content {
    position: relative;
  }
  .gallery-caption.gallery-caption-grid-masonry {
    width: 100%;
    max-width: unset;
  }
  .gallery-masonry-item-wrapper a:after {
    content: unset;
  }
}

My testing

image.thumb.png.07d5a1f0a96134fa25d66111d283f20e.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. 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.