This seems to work, but it needs to hack a bit of HTML. Basically, you just need to place a zero-width slot above the image to drop it without affecting anything else.
Add this to the HTML before the image:
<span id="evilNonSemanticSpacer"></span>
And use this CSS:
#evilNonSemanticSpacer { float:right; display:block; height:210px; } img { float: right; clear:right; }β
Remove the relative positioning from the image and it is in the right place, wrapping the text around it. An example script is here .
There is a weirdness with text wrapping in Chrome (the line above is above the image). However, it does not appear in Firefox. The only thing I can fix in Chrome is margin-top: 1.1em
in img
, but it will also lead to a space above the image in Firefox (and possibly in other browsers).
source share