Archived topic
Article Images caption not centered.
6 replies · Started by Atty on October 27, 2021
Hello,
when I insert an image with its caption, the caption remain at all left and it is not centered. And is also weird, it seems written in a small column. How to fix it?
I've added this code in custom CSS:
.wp-block-image figcaption {
text-align: center !important;
}
But it doesn't work at all (with or without !important)
Thank you in advance!
Picture: Problem on caption
Hi Atty,
You have this CSS which is causing the issue:
https://www.screencast.com/t/zy3cGiW8G
Can you disable your cache plugin so we can see where the code is coming from?
Let me know :)
Hello Ying,
done it, cache plugin disabled :)
Well, it's added in the WP 5.8.1, not sure what their purpose of adding this line of CSS...
Try this CSS to override it:
.wp-block-image .aligncenter>figcaption, .wp-block-image .alignleft>figcaption, .wp-block-image .alignright>figcaption {
display: block;
}
Let me know how it works :)
It works perfectly, thanks Ying, you are my myth. :) :)
Solved :) Thanks again.
You are very welcome!