Jump to content

Gallery Caption workarounds for 7.1?

Recommended Posts

5 hours ago, Alfredo24 said:

Hi

I?ve tried to add the CSS code but nothing happens
and I cannot add the JS code since I only have the basic subscription  so I don't have access to the tool code injection.
Any help?

You need to insert both CSS & JS.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Hi @brandon

First of all, thank you so much for helping many people solving the caption problem. I'm a very beginner to Squarespace, and was able to add proper credits to the light box thanks to your code. But I had encounter the same problem as @IvanOB

Quote

One problem, I can't correct is that when the next or previous image is chosen in lightbox, the caption for the previous image still shows for 1/2 seconds overlapping with the caption for the current image. The only way i have managed to fix is by making a black box around the caption as shown below.

Would you please help me to solve this problem?  

https://www.kinapark.com/children-stories/winter-forest

Thank you so much! 

Screen Shot 2020-04-07 at 6.13.43 PM.png

Link to comment

Hi Brandon, Guys, 

I have tried pasting the captions-work-around code into the CSS editor and nothing happened. wish i had known squarespace dont provide image captions before i signed up!  I am really bad at coding and really appreciate you helping out with this. 

Ideally i would rather have them display underneath the images and not in an overlay as shown in your demo. 

I saw your fix for this and tried that out. and again nothing. 

any advice?

🙏

Link to comment

Hi @j03ie. It is necessary to add both the CSS and the JavaScript. Take another look at the instructions and be sure you follow them fully, both parts. If you get it up and running, changing how the captions display is a matter of editing the CSS to your liking.

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Link to comment

Hi Brandon,

Thank you for this great solution to the lack of Lightbox captions in 7.1 - I have successfully added captions to my slideshow.

I was wondering if you know a way to have the caption break into 2 lines. My slideshow is an artist portfolio so the captions have the image title which I'd like to display on the first line and then size, year etc. which I'd like to display on a second line of text. Any thoughts?

Also, I am having the same caption overlap problem as some others in this forum: 

One problem, I can't correct is that when the next or previous image is chosen in lightbox, the caption for the previous image still shows for 1/2 seconds overlapping with the caption for the current image. The only way i have managed to fix is by making a black box around the caption as shown below.

Thanks so much for your help!

Erin

Link to comment

Just wanted to say a big THANK YOU for this workaround. It's super annoying this isn't supported natively yet, but also super appreciated to have solutions like this posted, which when I try them, just work! You've made me very happy, thank you! 🙇‍♂️

Link to comment

This is an update to let you know that I've added just a couple lines of CSS to fix the issue with the lightbox caption delay/lag issue. The lines are added at the end of the CSS in the original post. They are:

transition: opacity 0.1s ease-out;

.gallery-lightbox-item[data-in=false] .gallery-item-description {
  opacity: 0;
}

Special note to those who mentioned the issue: @kinapark , @IvanOB , @ed.design , @JohnS123

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Link to comment

Hi @brandon, I can't seem to get this right, even though your demo shows its do-able.

I have copy and pasted both codes and put them on my website.

No descriptions are coming up, but I am getting the text of what I saved the photos as, see example attached.

Is it just as simple as copy and pasting the two codes? Or do I need to edit the code to match my website?

I only have one gallery in use (which is a simple slideshow), so I thought it would automatically apply to it.

Any help appreciated, thanks.

Screen Shot 2020-04-30 at 2.40.02 pm.png

Link to comment

hi @brandon, Do you know if it is possible to get the same codes but for Tablet and Mobile ? I tried with @media only screen and (max-width: 640px) below but it messes up the desktop view as well.

 

Thank you !

Link to comment

@gabmartinez7: If you're seeing a filename, that is likely because you have not entered description text. See the third bullet point under "JavaScript" in the original answer.

However, if that's not the cause, then could you provide a link to the page in question?

@Charlest93: I'm not sure what you mean by "get the same codes". Having said that, I did take another look at the CSS for the "Slideshow" gallery type where thumbnails are displayed, and I realized that things weren't displaying quite right on mobile. So I made a small adjustment. You could try using the updated CSS in my original post. If that doesn't work, can you provide a link to the page in question?

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Link to comment

Ah, sorry about @Charlest93. I forgot you had already sent a link earlier in this post. Also, your English is much better than my French!

What you want can be accomplished with CSS alone. However, it does require an understanding of it, and being comfortable using your browser's web inspector to identify elements and get them looking like you want.

I've written some additional CSS you can add that should help you get a start on it. However, while you can certainly add the following CSS after what you already have, it'd be better to review it and edit your existing CSS to minimize overlap.

@media screen and (max-width: 767px) {
  .gallery-grid-item {
    padding-bottom: 0;
    margin-bottom: 30px;
  }
  .gallery-item-description {
    padding: 0 !important;
    top: 50%;
    transform: translateY(-50%);
    bottom: inherit !important;
    font-size: 1em;
  }
}

Let me know how that works for you.

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

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.