Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Justify image captions Left? #8901

Closed
frodojrr opened this issue Aug 12, 2018 · 4 comments
Closed

Justify image captions Left? #8901

frodojrr opened this issue Aug 12, 2018 · 4 comments
Labels
[Status] Not Implemented Issue/PR we will (likely) not implement. [Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@frodojrr
Copy link

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.

@renrizzolo
Copy link

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

@ajitbohra ajitbohra added the [Type] Help Request Help with setup, implementation, or "How do I?" questions. label Aug 14, 2018
@tofumatt
Copy link
Member

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.

@umair-mirza
Copy link

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.

@ghost
Copy link

ghost commented Apr 9, 2021

Would this be the same for captions on tables? Alignment should work in the editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Not Implemented Issue/PR we will (likely) not implement. [Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

5 participants