A few days ago, Hugh at Hugh’s News and Views wrote a post How to Center Captions Under Images and Photos In a Blog Post. Many responded that they had struggled with the same issue, me included.
Hugh’s instructions, excellent as always, work on individual images. If your posts contain many images or photos, you might find it tedious to do each one separately.
What if you could center all of the image captions on your site as the default?
YOU CAN!
By adding a short piece of CSS code in the Administration section of your site, you can center image captions by default.
HERE’S HOW:
Go to the Appearance tab and hit Enter

A menu list comes up with the Additional CSS tab. Hit this option.

This opens the CSS Editor and is where you will add the short code to “magically” center all image and photo captions on your blog site.

ENTER THIS CSS CODE
.wp-block-image figcaption {
text-align: center;
}
PRESS SAVE CHANGES
Check your sites images. How did that work for you? Good, I hope! If not, verify that it is typed exactly as written above.
BONUS OPTION
Now that you mastered that bit of programming, perhaps you would like to also change the text size (font). Just one addition to the code will do that for you as well.
HERE’S HOW:
Add the code font-size: small; to the code you just created. If you prefer to set a specific size font, it would be written as font-size 18px; replacing the number (18) with the specific size you want.

ENTER THIS CSS CODE
.wp-block-image figcaption {
text-align: center;
font-size: small;
}
PRESS SAVE CHANGES
I would love to hear from anyone/everyone on how this worked for you? Did you find it helpful? I’m open to questions on this as well.
Disclaimer: These bits of code may not work for all sites since not all blog sites are the created equal.
Thanks for this Judy. I just applied it to my site and it worked like a charm! This is why I love the blogging community so much. Everyone is so willing to share their helpful tips and ideas. Have a fabulous week!
LikeLiked by 1 person
You are welcome. Glad I could help. I love the blogging community too. Such a positive group.
LikeLiked by 1 person