Forum Bugs

Float alongside text

fassungsvergleich
Hello,

when trying to right-align some additional information alongside existing text, I ran into a problem with Prince.

My code looks like this
<div>
    [Text]
    <div style="float:right">[Right-aligned text]</div>
</div>


What I would expect (and what is rendered with all Browsers I tested) is that the text in the floating div would be positioned alongside the last line of text, if there is enough space.

E.g. This is what I would expect:



However, this is what is generated in my PDFs:



I attached a demo file to this post.
Is this a bug with Prince? If so, is there a workaround for achieving this kind of formatting?

Thanks!
  1. prince-float-bottom.html0.8 kB
mikeday
This looks like a bug; it works if you apply "display: inline" to the div, or change it to a span.
jim_albright
This looks like an easy solution for a problem I sometimes have when adding a cross-reference to the text.

Jim Albright
Wycliffe Bible Translators

fassungsvergleich
Thank you! The "display:inline" works great in both Prince and Browsers.