W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: Floating a figure next to the preceding paragraph

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Fri, 13 Jan 2012 13:06:37 +0100
Message-Id: <602CEEE2-613B-4686-A988-9CA78E831026@crissov.de>
To: "www-style@w3.org list" <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT