See this answer revision: the images are floating above the heading's text-bottom line.

enter image description here

This is caused by images having a margin-bottom: 0.5em. This declaration isn't needed inside headings because those headings already have a margin to space them away from surrounding text.

enter image description here

Instead images inside headings should have margin-bottom: 0 which will let them sit at text-bottom.

enter image description here

I suggest adding the following CSS:

.post-text h1 img,
.post-text h2 img,
.post-text h3 img {
  margin-bottom: 0;

1 Answer 1


In the years since, styles changed so that the bottom of the image is slightly lower than the descenders, in both regular text and headers:

It looks good. I'd say .

  • \$\begingroup\$ That's wonderful news. Looks good to me too. \$\endgroup\$ Mar 21 at 13:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .