Jump to content

Aligning text to images in slide (CSS)

Recommended Posts

Hi there,

I am adding a few CSS bits to a gallery of images I have on my Hishimoto template, but I think I've messed up with something 😅  I wanted the title appear when hovering on an image in the slide. So I added this CSS code: 

/* even though they are turned on, hide the image caption */
.collection-type-gallery #slideshow .slide.sqs-active-slide[data-type="image"] .image-description {
  opacity: 0 !important;
}
/* bring the opacity back, only on image hover */
.collection-type-gallery #slideshow .slide.sqs-active-slide[data-type="image"]:hover .image-description {
  opacity: 0.85 !important;

@media only screen and (min-width: 801px)
    { 
.slide img {
             border-left: 200px solid;
             border-right: 200px solid;
             border-color: white !important;
}
}
@media only screen and (max-width: 639px)
    { 
.slide img {
             border-bottom: 200px solid;
             border-color: white !important;
}
}

But, cause I added bigger borders to the images in order to get more space between each other, the title is now too wide (I want it to match the width of the specific image). See screenshot and thank you! 🙏

Screenshot 2020-05-19 at 17.37.08.png

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.