Forum How do I...?

Float behavior changes from Prince 14.4 to Prince 15

jenniferflint
We are testing Prince 15 on dozens of recently published articles and find that most of the differences are minor. However, in one article (attached) where there are multiple images in an appendix, the text that should appear after those images is now occupying the same space as the image and not respecting the space that the image should occupy. This was not the case in Prince 14.4 using the same CSS, so something has changed about the behavior of floats and it may be that we need to update our CSS using the various new prince-specific CSS values for float behavior, but a cursory review didn't yield any success.

I have attached the HTML and CSS files used for this layout for your use in troubleshooting this problem. There are excerpts from each of the PDFs showing the problem, as well.

Any ideas?

Thanks,
Jen
  1. ps.20005.moh-sample.zip634.8 kB
howcome
It's a complex document and I don't understand all that goes on. But try removing "unless-fit" from this line: "float:prince-snap unless-fit"

Edited by howcome

jenniferflint
Yes, it is a very complex set of stylesheets and taking out "unless-fit" does resolve the problem of text overlapping this particular image. Further investigation has shown me that the error was caused by the fact that the source SVG images in this case lack a value for their height attribute in the HTML file. When I manually add in a height value to the CSS file, then the overlapping text problem goes away. So perhaps that float-modifier:unless-fit is only calculating now based on a value within the floating object and it couldn't determine what area this float required without a value for height. We will work to modify our image files to ensure that they all contain a height value to avoid this problem. Thanks for your help!