Archived topic
Text sticking to under image
7 replies · Started by Dina on November 14, 2022
Hi, I noticed that I have text sticking to images in all my articles unless I deliberately leave an empty block under the image. Here's an illustration: https://snipboard.io/2AW4DG.jpg
It's too much work to update all my articles——is there a simple solution to fix this? (i.e. to add a space under all images so the text doesn't stick to the bottom of the images). Thanks!
Hi there,
yeah, WP 6.1 made some changes to there Image Block styles ie. they removed the bottom margin.
Add this CSS to correct that:
figure {
margin-bottom: 1.5em;
}
Hi David, I have to add it to my Custom CSS, yeah? I just added it like this: https://snipboard.io/
But it doesn't seem to be working. Any ideas?
Thats correct.
Change the CSS to this:
.wp-block-image figure {
margin-bottom: 1.5em;
}
Thanks David! That seems to be working for a few articles. I added both CSS and it's fixed the issue on desktop. On mobile, however, the issue persists. Any ideas for this? Thanks SO much for your help.
Can you clear the autoptimize cache ? I think the old CSS is stuck in there :)
It works. Thanks so much again, David! Appreciate it.
Glad to hear that!