| SitePoint Sponsor |
Do you have any css code behind that? If not I think giving the text a float: left; property might fix your problem.





Hi paul,
your problem is interesting and it is not easy. The reason it's not easy is because if I were to try to duplicate that, I'd have to insert the image after "vestibulum erat" and then float it right to get the rest of the text to wrap at the correct spot. And that's a brittle way of doing it, since anyone having a slightly larger or smaller font size means the wrapping won't look right.
Hmm... I'm almost thinking this is something someone would do in one of the CSS quizzes. You're trying to imitate print, and this is something CSS sometimes gets really clunky with.
thanks for your quick answers!
I tried floating the text but it doesn't help.
I'm going to look into the new CSS3 layouts, maybe that will help





No, don't float the text, float the image.
There *might* be something for this specifically in CSS3 (I'm thinking about how they've started implementing "columns" in the way a newspaper does) but even if there is something, it may only be implemented in a single browser. CSS3 is coming out in "modules" and even after that, you've got to wait for browser support... unless you're writing for a single browser (like an iPhone app or an intranet).
Actually I just found out how to do it!
I found this article:http://www.alistapart.com/articles/crosscolumn/
so I put the image inside a span, in the middle of the first paragraph with a negative margin and I get the desired result.
Hi,
I do remember reading that article some time ago. That technique does produce a nice result when used along with two floated columns as they show in Example 4.
However, if you are just wanting two separate paragraphs to wrap around the image in a single column setup then I see no reason why a Single Sandbag Float would not work for you.
As you can see it has no problem stopping one paragraph midway down the float and starting the next one. If the height of the sandbag float was to be set in ems then the floated image would stay proportionally positioned with the text.![]()
Ray H.- css-lab.com
W3C Specs - CSS 2.1 | CSS current work | Properties Index




SitePoint Guru
Sitepoint - the ultimate Css well
As a computer, I find your faith in technology amusing.
Sitepoint reference, your friend in need
That one has been there a long time Luki. I have some more in a "Sandbag" section of my demos. (link in sig)
Here is one I just put together that uses all ems for sizing and two paragraphs of equal text amounts. (probably would not happen in a real world case)
It seems to hold together very well with "zoom" and "zoom text only" (FF)
Code HTML4Strict:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Scaling Sandbag Float</title> <style type="text/css"> body { background: #fff; font-size:100%; margin:0; padding:0; } #wrapper { width:26em; margin:1em auto; padding-top:.6em; overflow:hidden; background:#EEF; border:1px solid #000; } #sandbag{ float:right; width:5px; height:7em; background:red; } #image{ float:right; clear:right; width:10em; height:5em;/*10em total*/ border-top:5em solid #000; margin:.5em .6em 0; background:#333; } p{ margin:0 .6em .5em; text-align:justify; } h1{ font-size:1.6em; padding-top:.2em; text-align:center; } </style> </head> <body> <h1>Scaling Sandbag Float</h1> <div id="wrapper"> <div id="sandbag"></div> <div id="image"></div> <p>Lorem ipsum dolor sit amet consectetuer justo nec ut ac enim. Auctor dictumst quis egestas ut cursus mauris augue fringilla orci pede. Vel a est at semper sed natoque eleifend id convallis Donec. Augue ut congue ac tellus dignissim Ut pretium Nullam sed Nunc. Nec elit dui Nullam parturient In ut elit Curabitur id at. Vestibulum Cum id Donec sagittis pede tristique non ipsum Sed et. Vestibulum Cum id Donec sagittis pede tristique non ipsum Sed et.</p> <p>Lorem ipsum dolor sit amet consectetuer justo nec ut ac enim. Auctor dictumst quis egestas ut cursus mauris augue fringilla orci pede. Vel a est at semper sed natoque eleifend id convallis Donec. Augue ut congue ac tellus dignissim Ut pretium Nullam sed Nunc. Nec elit dui Nullam parturient In ut elit Curabitur id at. Vestibulum Cum id Donec sagittis pede tristique non ipsum Sed et. Vestibulum Cum id Donec sagittis pede tristique non ipsum Sed et.</p> </div> </body> </html>
Ray H.- css-lab.com
W3C Specs - CSS 2.1 | CSS current work | Properties Index

This currently isn't possible what you are trying to achieve, unless you do something like slantastic (Eric meyers site for details)
CSS3 doesn't have something for this (even if there is some module I haven't heard about, support would be miniscule)
Twitter-@Ryan_Reese09
http://www.ryanreese.us -Always looking for web design/development work
There is this if it's any help... http://www.bigbaer.com/css_tutorials....text.wrap.htm




SitePoint Guru
Sitepoint - the ultimate Css well
As a computer, I find your faith in technology amusing.
Sitepoint reference, your friend in need




SitePoint Guru
Sitepoint - the ultimate Css well
As a computer, I find your faith in technology amusing.
Sitepoint reference, your friend in need
Paul, the ALA technique is tricksy. I like it, but...![]()




Great, already checking it out![]()
SitePoint Guru
Sitepoint - the ultimate Css well
As a computer, I find your faith in technology amusing.
Sitepoint reference, your friend in need
Ray, the Examiner uses something like your "sandbag float" technique in the template for its stories. The difference is, their code is horrendous.![]()
thanks Rayzur, I'll be sure to check that out.
thanks to everyone who contributed!




Off Topic:
Paul, did you check your PM?
SitePoint Guru
Sitepoint - the ultimate Css well
As a computer, I find your faith in technology amusing.
Sitepoint reference, your friend in need
Bookmarks