Site logo

Archived topic

Image Caption Centered: Revisited in 2020

4 replies · Started by Jim on January 19, 2020

Viewing posts 1–5 of 5

My captions are centered in the WordPress editor, but they are left-justified in the published view, as shown in the URL I've provided.

I tried adding the CSS described in this 2015 post, but it did not change the alignment:

https://generatepress.com/forums/topic/image-caption-centered/

Per the post above, I tried the following CSS -- in Simple CSS and in the Additional CSS areas in Customize for your theme. No change. Suggestions?

.wp-caption .wp-caption-text {
width: 100%;
text-align: center;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

Update: I've deleted the CSS I added in an attempt to fix this issue. So you won't see that.

Hi there,

try adding this CSS:

.wp-block-image figcaption {
    text-align: center;
}

Thanks, David! I added this CSS to in the Additional CSS areas in the Customize section for your theme. It worked great.

You're welcome

This archived topic is closed to new replies.