Displaying long captions in the lightbox view

In this tutorial, I will show you how to change the default one-line view of captions. Currently, when you open a photo in lightbox view, you can only see the first line of your captions. This is because, on smaller screens, long captions would take up too much space over the photo.

But if you don’t mind that, you can show entire captions by adding a CSS content block to the ENTIRE SITE section of your website and by adding this code to it:

CSS
.sm-lightbox-v2-photo-title .sm-text-ellipsis {
    white-space: normal;
    overflow: visible;
}

.sm-lightbox-v2-photo-title .sm-button-label {
    overflow: visible;
}

Leave the first comment