Archived topic
No space between media and paragraph in article
13 replies · Started by Sachin Prajapati on December 5, 2022
Hello,
I found no space between image(or any media like videos) and paragraph following that image in all articles.
You can see in the following article that there are a few images in the article but there is no space after any image.
https://www.wpressblog.com/best-ai-writing-tools/
Please let me know how can I keep space after media files in all articles.
Thank you.
Hi there,
in WP 6.1 they changes the img HTML/CSS which meant the margin gets stripped.
Add this CSS to fix that for now:
figure,
.wp-block-image figure {
margin-bottom: 1.5em;
}
Thanks for the solution!
You're welcome
Hi!
Do you have any idea if this problem is going to be fixed in future updates? All in-content images lost the margin and it seems a bit silly that is probably going to be fixed fully in future updates?
Thank you in advance :)
Do you have any idea if this problem is going to be fixed in future updates?
It should be a question for WP, as the image block is a WP core block and they used to add margin-bottom to it until recently they removed it during an update.
What do you think will they? Because partly themes would need to adjust that directly, because it doesn't seem to benefit anybody so much.
I guess what im afraid of I manually add the margin and either theme or wp will add it back soon, because it really does seem weird change
Hi there,
we are looking to address this, the issue we face is whether we make a change to the theme to add those styles and later WP makes another change ( it is not the first time they have done so ).
Until then, use the CSS above:
https://generatepress.com/forums/topic/no-space-between-media-and-paragraph-in-article/#post-2450140
If in the future there is another change ( whether it be us or WP ) and additional margin gets added then you can remove the CSS.
Thank you :) I kind of have exactly the same issue, but also with GP premium in between too.
Any idea if you are thinking to address this one way or another soon?
Thanks again, meanwhile I can use the css
Oh yes, its on our radar, the issue we face is how best to add it so it is not affected by any subsequent changes that WP may make. But we will get it fixed.
Hey! Couple of months has passed and I didnt get around to fixing the margin yet so I thought to ask just in case is there any discussion on your side to add the margin or a decision to leave it to the users?
Just being lazy wouldnt want to do it twice :D
:) For now use the CSS method.
We are still exploring the best way forward as the theme.json method has some knock on effects that we have yet to overcome.
Thank you again, added it now :)
You're welcome