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

Re: Floating a figure next to the preceding paragraph

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Fri, 13 Jan 2012 19:48:42 +0400
To: Christoph Päper <christoph.paeper@crissov.de>
Cc: "www-style@w3.org list" <www-style@w3.org>
Message-Id: <83301326469722@web31.yandex.ru>
12.01.2012, 22:06, "Christoph Päper" <christoph.paeper@crissov.de>:
> A pattern I come across frequently, e.g. on Wikipedia, is 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.
>
>   <article>…
>     <p>Foo</p>
>     <figure>Bar</figure>
>   …</article>
>
>   Foo    Bar

Currently, CSS has no proper ways to reorder elements.

Given your specific example, you may use {display: table*} with extra-div wrapping elements intended to be displayed side-by-side, _if_ exact floating behavior (with text placed partially _under_ floating element) is not required.

For vertical reordering, this my article may help you:
http://tanalin.com/en/articles/css-block-order/
Received on Friday, 13 January 2012 15:49:22 GMT

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