Centering image caption text in Radcliffe 2

  • Unknown's avatar

    Hi, I am needing assistance in centering the image caption text on my site. When I center the caption text in edit mode it appears to be centered but when I preview or save the changes, caption text is all left-aligned.

    I have tried adding the following addition CSS in the theme

    .wp-caption-text { text-align: center; }

    But it has made no difference. Please help as it does not look great to have left-aligned image caption

    thanks in advance

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there,

    I understand you’re seeing an issue where the image caption doesn’t appear centered on the front end — even though everything looks correctly set up in the editor. I had a look too and noticed the same thing, so it does seem like we’ll need to do a bit more digging to figure out what’s going on.

    In the meantime, I saw that you added this CSS:

    .wp-caption-text { text-align: center; }

    That’s a great start! But the class name used for captions is actually .wp-element-caption, not .wp-caption-text. So updating the code to target the right class should help for now.

    Try that and let me know how it goes! I’ll keep checking on my end as well to see why the default alignment isn’t kicking in.

  • Unknown's avatar

    Hi, thank you for your response. I changed the CSS to .wp-element-caption as you suggested and it has worked! I am so happy with the result – thanks so much for your help :-)

  • The topic ‘Centering image caption text in Radcliffe 2’ is closed to new replies.