Archived topic
How to Change Font Size and Color of Image Captions
3 replies · Started by Data on June 9, 2020
I am using WordSmith, the image captions are same-sized like regular page content. I want to depreciate the captions form the normal content. Kindly do let me know how to change its color and font size. I read previous form threads, but none of them work on my site.
Hi there,
Try this CSS:
.wp-block-image figcaption {
font-size: 10px;
color: #000000;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Thank you. Just one more thing, can we place an in-line small icon alongside the image caption?
Hi there,
you can use a :before pseudo element to add an image:
.wp-block-image figcaption:before {
content: url(your_image_url_here);
margin-right: 1em;
}
You will want the image to be the exact dimensions as it cannot be resized with CSS.
The content property accepts unicodes for font icons as well.