Archived topic
How to do consistent image captions
1 reply · Started by Ben on September 30, 2020
Hello,
I am struggling with image captions.
When I insert a gallery I get captions which sit inside the image at the bottom in the middle with a white stripe at the bottom. This I like. This I want.
When I insert and image NOT in a gallery the image caption is below the image, in the middle and not backed with a white stripe.
How do I make what is happening to the gallery images happen to the captions on the normal images?
See this page to give an example of both - http://www.keepsafestorage.co.uk/corporate-event-management/retail-personalisation/
Hi there,
try adding this CSS:
.wp-block-image {
position: relative;
}
.wp-block-image figcaption {
background: rgba(255, 255, 255, .7);
color: #000;
text-align: center;
padding: 10px;
margin-bottom: 0;
box-sizing: border-box;
position: absolute;
bottom: 0;
width: 100%;
max-height: 100%;
overflow: auto;
}