Forum How do I...?

Float and text wrapping

JamesSas
greetings,
i am attempting to wrap text inside of arbitrary objects. the following example works in firefox and ie7 but not when rendered using princexml.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Text wrapping example</title>
        <style type="text/css">
          .l { float: left; clear: left; height: 14pt; }
          .r { float: right; clear: right; height: 14pt; }
        </style>
    </head>
    <body>
        <div style="text-align:center;overflow:hidden;position:relative;width:125pt;height:112pt;font-size:12pt;line-height:14pt;">
            <div class="l" style="width:32pt;"></div>
            <div class="r" style="width:32pt;"></div>
            <div class="l" style="width:16pt;"></div>
            <div class="r" style="width:16pt;"></div>
            <div class="l" style="width:8pt;"></div>
            <div class="r" style="width:8pt;"></div>
            <div class="l" style="width:4pt;"></div>
            <div class="r" style="width:4pt;"></div>
            <div class="l" style="width:4pt;"></div>
            <div class="r" style="width:4pt;"></div>
            <div class="l" style="width:8pt;"></div>
            <div class="r" style="width:8pt;"></div>
            <div class="l" style="width:16pt;"></div>
            <div class="r" style="width:16pt;"></div>
            <div class="l" style="width:32pt;"></div>
            <div class="r" style="width:32pt;"></div>
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
            i i i i i i i i i i i i i i i i i i i i i i i i i i
        </div>
    </body>
</html>


is there an alternative method to accomplish the same end? i've played around with a few other things but so far have come up short. thx!
mikeday
That's a neat test case! We'll take a look and see if we can figure out why the text isn't expanding to fill the available space.
JamesSas
have you guys had time to take a look at this yet?
mikeday
Yes, this appears to be a limitation of Prince where the available width is being constrained by all the floats below the text in the block, not just the floats that directly touch the text in question. In effect, this means that the text area needs to be convex, not concave. Removing the bottom half of the circle and leaving a semi-circular area will work. We will attempt to remove this limitation in a future release of Prince; thanks for letting us know! :)
JamesSas
... and thanks for the response! Knowing that i can still use this technique with bell shapes and the like is helpful. ta.