May 25, 20209:24 AM - edited May 25, 20209:27 AM
Participant
White space when delete blog post image
Hello, I have a blog post template with some images, but if in one post I don't want to use one of these images and I delete it, it appears white space in the image gap.
I'm assuming that the wrapping html for the image has a min-height in the css or line-height. You could use a conditional to show or hide the image. If placed a little pseudo code below to illustrate. (this is not working hubl)
{% if !image %}
{# do nothing #}
{% elif %}
<div class="……
{% endif %}
There is also potential to use an attribute selector on img tags with CSS: