Replace float with flexbox

Inline images are a little odd, in that they take up the entire width of their container. Floating the close right worked for short lines, but for long lines, it would appear way off to the side.

Switching to flexbox allows us to reorder the image and the close button, and solves this issue