Jump to content

Wexley template: restricting image caption to image width

Recommended Posts


I'm no good at coding so please bear with me 🙂 I'm using the following code to display captions on a gallery page, as I need the hover effect and image arrangement for a project. It does display the image captions fine, however their width is not very elegant. As I'm collecting people's testimonies it's supposed to tell their story, so I'd like to at least restrict the caption width to the image width so that it fits elegantly and, if possible, doesn't scroll.

This is the code:

.collection-type-gallery #slideshowWrapper .image-description {
text-align: center;
width: 100%;
padding: 10px 0px 0;
background: #fff;
display: block;
position: relative;
bottom: 0px;
margin-top: 0px;
margin-bottom: 25px;
.collection-type-gallery #slideshowWrapper .sqs-gallery-design-stacked-slide img {
max-height: 90%;
margin: 0 auto !important;
margin-left: auto;
margin-right: auto;
top: 0 !important;

Can anyone help?

The page in question: https://www.nunoconceicao.com/portfolios/a-espera

Every time you click an image it should show the image description with its width limited to the image size for easier readability and elegance, but instead it fits the screen.

Better yet, if there was a way to elegantly wrap these two together and place the lightbox image and text side by side, with the text on the right and centering both on the screen it would be even better... I honestly can't decide. I think the first way would be simpler to implement?!


This also does not work because the max-height:90%  line does make the caption show but squashes the image, which for a photography website is not the best solution...

Link to comment
  • Replies 0
  • Views 461
  • Created
  • Last Reply


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.