Re: Floating a figure next to the preceding paragraph

Christoph Päper:

> a paragraph that semantically introduces a figure and, therefore, in markup the text should also come before the table or embedded picture, but they should be displayed side-by-side, with the figure starting at the same vertical position as the paragraph (i.e. aligned top edges) or at the next available position below. 
> 
> As far as I can see, there is currently no simple way to achieve that in CSS,

Maybe Regions could do it with few additions:

  p {
    position: relative;
    padding-right: 20em;
    flow-flush: figures; /* force display of figures that came earlier */
  }
  figure {
    flow-into: figures;
  }
  p::after {
    flow-from: figures;
    position: absolute; top: 0; right: 0;
    width: 18em;
  }

(Sorry, I didn’t look up the most recent syntax.)

Received on Friday, 13 January 2012 12:07:10 UTC