If anybody else ever has this problem in the future I came up with a solution.
David suggested I add clear: both
to my headings, although this created some spacing problems. If that happens to you then you can rectify this by adding some negative margin-bottom
to the <figure>
. Adding negative margin-top
to the h2
or h3
did nothing for some unknown reason.
Here’s the CSS:
.post-content h2,
.post-content h3 {
clear: both;
}
.prior-to-heading {
margin-bottom: -50px;
}
For the image you’re going to have to utilize an HTML-card, which will basically look like this:
<figure class="prior-to-heading">
<img src="____">
<figcaption></figcaption>
</figure>
If you don’t know how to set up an image with an HTML-card I explained that here (skip the bit about adding in the <a>
tag).