Jump to content

How to style image captions in masonry gallery?

Go to solution Solved by tuanphan,

Recommended Posts

I am trying to style the captions for a masonry gallery in Squarespace 7.1 . Currently, I am using this code: 

.gallery-caption p:first-line {color: black; font-size: 1.2rem; font-weight:regular}

Unfortunately, this only applies to the first line of the caption. Once the caption is longer and breaks to a second line, it no longer has any effect (See attachment). And yes, I am aware that the code says "first-line" but what other option would I have?

Any advice?

Bildschirm­foto 2023-03-20 um 10.56.12.png

Link to comment

Hi tuanphan. Thank you for your suggestion. When I remove :first-line from .gallery-caption p:first-line {color: black; font-size: 1.2rem; font-weight:regular}, it eliminates all custom formatting from the gallery captions. I am trying to customise the complete captions for images in masonry.

Bildschirm­foto 2023-03-26 um 22.35.19.png

Link to comment
  • Solution
On 4/4/2023 at 2:41 AM, ben_space said:

You can use this CSS

figure.gallery-masonry-item p {
    font-size: 1.2rem !important;
    color: black !important;
}

 

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 4/12/2023 at 8:31 PM, ben_space said:

Thank you, @tuanphan. This solved my issue perfectly. Do you have a solution to style the overlay caption as seen in the attachment with CSS?

https://salmon-sphere-62ml.squarespace.com/work/portrt

PW: AZI2022

Bildschirm­foto 2023-04-12 um 15.29.31.png

What do you mean? It looks same to me

image.thumb.png.335749b316752cece9fbb6bea54fde45.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 4/15/2023 at 1:13 PM, tuanphan said:

What do you mean? It looks same to me

image.thumb.png.335749b316752cece9fbb6bea54fde45.png

The image caption in lightbox mode is in a different font and stale as the masonry image caption. I want to adjust the style and font of the image caption in the lightbox view.

Link to comment
On 4/17/2023 at 5:01 PM, ben_space said:

The image caption in lightbox mode is in a different font and stale as the masonry image caption. I want to adjust the style and font of the image caption in the lightbox view.

Add this to Design > Custom CSS

/* Lightbox caption */
.tlightbox-caption {
    font-family: europa;
    font-style: normal;
    letter-spacing: 0em;
    text-transform: none;
    line-height: 1.8em;
    font-size: 1.2rem !important;
    color: #000 !important;
    font-weight: bold !important;
}

 

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

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.