views:

460

answers:

3

Is there a way with CSS to wrap text on both sides of an element (an image for example). I am trying to have an image positioned in the middle of a paragraph and would like text to flow over it. Please see the image for an example. http://i42.tinypic.com/14mvp69.jpg

Positioning an element typically takes it out of the document flow; so that doesn't work.

+1  A: 

I don't think so, no. Not without working with multiple text-columns.

I just threw together one possible solution. You can access it at http://www.sampsonresume.com/labs/img-in-middle/

Jonathan Sampson
Great! Thanks for that.
Ahmed
A: 

Not without some very tricky/tedious text parsing. But anyone trying to read that text would hate you if you made them jump back and forth across an image twice per line, so that's probably a good thing.

Steve Losh
+1  A: 

The only thing that I have seen similar to this would be the A List Apart article: Cross-Column Pull-Out Part Two: Custom Silhouettes. You still need multiple text columns, and even ALA lists it as "experimental". It may be worth checking out, though.

Example here.

Zack Mulgrew
Thanks for that Zack; it's very helpful.
Ahmed