Re: Floating a figure next to the preceding paragraph

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 UTC