Forum Documentation

float: outside top unless-fit ??

OK. I know that the above isn't valid per the syntax.
But, is there a way to:
a) float an image outside the paragraph(s) that follow it in the source, but
b) If the image is too tall to fit on the remainder of the page, then display it on the outside of the text at the top of the next page, without
c) leaving an empty space on the page (i.e. the text should continue; the image should be floated to the top of the next page.)

I'm not sure about the "outside" part, do you want to take the image out of the paragraph and make it a block level element by itself? You could use JavaScript to do this, and then just "float: top unless-fit", would that help?
The image is a block level element (I think, at least: it's outside of the paragraph - in the html - with display: block)

Just "float: top unless-fit", takes it out of the paragraph in the output, too - which is not what I'm aiming for. The attached extract illustrates what I am trying to get, except that on p. 174, when the image is forced to the next page (by: page-break-inside: avoid;) , the text of the following paragraph is, as well.

Is there a way to get that?


  1. Gulliver.extract.pdf1.9 MB
I don't think we can do this yet, page floats are not that powerful. :(
This thread and this one are what I was looking for :-)

One question in this context though (and before I play around with this): can I flow the caption of such a top-floated image into the outer margin of the page? If so, how?
How about "float: outside" and negative margin?