Justify image captions Left?
Can't find this in the image block or any of the docs. I add a caption to an image, the text aligns centered. How can I get it to align to the left?
Thanks.
You could either add a custom class to the image block (in the block settings panel: advanced > additional css classes) e.g add caption-align-left, and in your theme's stylesheet:
.wp-block-image.caption-align-left figcaption {
text-align: left;
}
or override the default css for it to always align left
.wp-block-image figcaption {
text-align: left;
}
There isn't a way to set the image caption's alignment in the image block itself, but as mentioned by @renrizzolo you could either set the captions in your theme to always align left, or create a custom CSS class in your theme that does this and apply it to your image block.
If you haven’t changed your theme’s CSS properties then the default css property to change is:
.wp-block-image figcaption {
text-align: left;
}
If you want step-by-step instructions on how to extract the tight CSS property then follow this Guide.
Would this be the same for captions on tables? Alignment should work in the editor.