Jump to content

Lightbox-only caption photo gallery with CSS?

Go to solution Solved by tuanphan,

Recommended Posts

Is there a way to make captions appear only in the lightbox when pressed in the photo gallery? I keep searching other threads and I keep injecting CSS through the Website > Website Tools, and nothing changes on my site at all. I also only have the personal plan so I cannot use Java.

I really like the "Wells" template and how the photo captions appear on the corner of the site, and I'd love to implement something like that into mine.

Link to comment

You'll need to share the website for us to take a look.

Work With Me 🖥️💻📱

Please remember to tag me so that I get a notification and respond to your help requests.

If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly.

You can also thank me or make requests by buying me a coffee . (Caffeine fuels me to take more requests)

For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials)

For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩

Some links may be affiliate/referral links.

Link to comment

This would require javascript as it is not possible with pure CSS unless you wish to manually re-add.

That would also not be accessible. I might have a plugin I've created for this somewhere lying around in but it would definitely require javascript.

 

Work With Me 🖥️💻📱

Please remember to tag me so that I get a notification and respond to your help requests.

If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly.

You can also thank me or make requests by buying me a coffee . (Caffeine fuels me to take more requests)

For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials)

For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩

Some links may be affiliate/referral links.

Link to comment
  • Solution

You can use a CSS code like this (Website > Website Tools > Custom CSS)

[data-slide-url]:after {
    display: block;
    color: black;
    z-index: 99999;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}
[data-slide-url="u912u88ef4rhh05pptrzi3tazv1pr4"]:after {
    content: "Feral Goats on Slievecarran";
}
[data-slide-url="1kv0c7bmb7tf9i671nq7zlvzvor0nf"]:after {
    content: "Bouleevin-Sunrise";
}
[data-slide-url="9fdxxom6mdst2k89vrmsk0tph2qbgg"]:after {
    content: "Doonties-Gateway-Dingle-Peninsula.jpg";
}

Result

image.png.37195e71bdcbdbe0366b6788a87a05aa.png

To find data-slide-url, you can open lightbox > right click anywhere on the page > Inspect

It will show a box on right or under screen > You can search data-slide-url

it will show all

image.thumb.png.cb70689f4dbceb9ac59e88a931e6755c.png

 

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
On 3/2/2024 at 3:59 AM, tuanphan said:

You can use a CSS code like this (Website > Website Tools > Custom CSS)

[data-slide-url]:after {
    display: block;
    color: black;
    z-index: 99999;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}
[data-slide-url="u912u88ef4rhh05pptrzi3tazv1pr4"]:after {
    content: "Feral Goats on Slievecarran";
}
[data-slide-url="1kv0c7bmb7tf9i671nq7zlvzvor0nf"]:after {
    content: "Bouleevin-Sunrise";
}
[data-slide-url="9fdxxom6mdst2k89vrmsk0tph2qbgg"]:after {
    content: "Doonties-Gateway-Dingle-Peninsula.jpg";
}

Result

image.png.37195e71bdcbdbe0366b6788a87a05aa.png

To find data-slide-url, you can open lightbox > right click anywhere on the page > Inspect

It will show a box on right or under screen > You can search data-slide-url

it will show all

image.thumb.png.cb70689f4dbceb9ac59e88a931e6755c.png

 

This works amazing! Thank you so much for your help! 🙂

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.