Jump to content

Linking Hover Text on Gallery To Photo Link -Custom CSS

Go to solution Solved by nick_sh,

Recommended Posts

Posted

So I may be going about this all wrong but it's been a while since I've used code this much and just need some help with integrating it within squarespace's code.

So right now I have a page that has a masonry gallery (https://www.fatcrowcr.com/brand). I added css so when you hover over the images, a transparent block and the image description comes up on top of the image.
The only issue is now none of it can be clicked and taken to the link the gallery says for each image. Even if I want to code those links in, I'm not sure where to begin as each "gallery-masonry-item"'s only difference is the image source, caption and link.

Maybe I'm doing this all wrong or it's a simple fix I'm missing, but I definitely could use some help!

 

and here's the code I have with it so far
(the code for the caption is within each gallery images' description:
</p>
<h3>Title</h3>
<p>Sub text</p>
<h4>See More></h4>)

figure.gallery-masonry-item {
    position: relative;
}
.gallery-caption {
    position: static;
}
figcaption.gallery-caption .gallery-caption-wrapper h3 {
    position: absolute;
  color: #244B5A;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10%;
    z-index: 999;
    padding: 7%;
  opacity: 1 !important;
}

  figcaption.gallery-caption .gallery-caption-wrapper p {
    font-size: 1.3rem;
    position: absolute;
    color: #244B5A;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    margin-top: 45%;
    opacity: 1 !important;
}
    figcaption.gallery-caption .gallery-caption-wrapper h4 {
    position: absolute;
    color: #244B5A;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    margin-top: 65%;
      opacity: 1 !important;
}
.gallery-masonry-item-wrapper::after {
    background: white; 
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
   opacity: 0.7 !important;
}  
figcaption {
    padding: 0;
}
@media (hover:hover) {
  .gallery-masonry-item-wrapper::after {
  opacity: 0 !important;
  transition: opacity ease 200ms;
}
  .gallery-masonry-item:hover .gallery-masonry-item-wrapper::after {
    opacity: 0.7 !important;
}
  figcaption.gallery-caption .gallery-caption-wrapper h3 {
  transition: opacity ease 100ms;
  opacity: 0 !important;
}
  .gallery-masonry-item:hover .gallery-caption-wrapper h3 {
    opacity: 1 !important;
}
   figcaption.gallery-caption .gallery-caption-wrapper p {
     transition: opacity ease 100ms;
    opacity: 0 !important;
  }
  .gallery-masonry-item:hover .gallery-caption-wrapper p {
    opacity: 1 !important;
}
  figcaption.gallery-caption .gallery-caption-wrapper h4 {
      transition: opacity ease 100ms;
      opacity: 0 !important;
  }
  .gallery-masonry-item:hover .gallery-caption-wrapper h4 {
    opacity: 1 !important;
}
  }

 

  • Replies 2
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.