🎉 Happy 4th of July! Get 15% off GP Premium with the discount code: 4THOFJULY2020

[Resolved] Image Caption Centered: Revisited in 2020

Home Forums Support Image Caption Centered: Revisited in 2020

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1137417
    Jim

    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;
    }

    #1137418
    Jim

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

    #1137625
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

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

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

    #1137770
    David
    Staff
    Customer Support
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.