#45616 closed defect (bug) (invalid)
Image captions don't display in a line but just one word in a line
Reported by: | stramm | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Media | Keywords: | |
Focuses: | ui | Cc: |
Description
When adding an image with description to a post (in Gutenberg) and aligning it left or right, setting medium size and a link to the media, the caption (text between <figcaption>text</figcaption>) renders on the final page in all browsers I've tested not in one line using the width of the entire image above but each word of the caption uses one separarte line.
I tried to modify /wp-includes/css/dist/block-libraray/style.min.css and changed
.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.is-resized>figcaption{display:table-caption;caption-side:bottom}
to
.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.is-resized>figcaption{display:table-caption;caption-side:bottom;width:100%}
That fixed the problem for me if I add text next to the image. If however no text gets added, the caption spans over the entire site width and not only the image size.
Thanks,
Thomas
Change History (3)
Note: See
TracTickets for help on using
tickets.
Welcome to Trac and thanks for opening the ticket!
Could not reproduce the issue. I tested a long caption with both
twentyseventeen
andtwentynineteen
.Probably your theme has something to do. Can you please try with above themes and see whether the issue still persists?