Forum How do I...?

Page Layout Question

jhoweaa
I'm trying to create a report which has a tricky layout involving a floated element and div blocks which flow around the floated element. I've found a way to make the layout work in HTML, but the PDF does not format in the same way. I'm attaching some example HTML which should help with understanding what I'm trying to accomplish, along with two screen shots, one from a web browser (Chome), the other the PDF output from Prince 9.

Basically I need to display a table of information on the right side of the page. The table will take up about 1/3 of the page and the height is variable. On the left side, I have some complex content (not just paragraphs) which need to be displayed next to the table. The left side content is basically a set of content blocks that are only as wide as can be allowed without being clipped or hidden by the right side table. Once the content blocks are below the table, they should take up the entire width of the page. The 'html.png' should give you an idea of the layout. I've also attached a blurred example of what the report page needs to look like. As you'll be able to see, the content to the left of the floated table is more complicated than simple paragraphs.

Like I said earlier, I have code which will produce the proper layout when viewed with a browser, but not the PDF. I'm not sure what I need to change to make things format correctly in PDF. I'm wondering if there is some PDF specific CSS that I need to override to make things work?

Any help you can give would be greatly appreciated.

Thanks.

Jim
  1. html.png55.4 kB
    What the HTML looks like in Chrome
  2. pdf.png48.1 kB
    What the Prince layout looks like
  3. sample2.png2.8 MB
    Desired report output
  4. test.html1.9 kB
    Sample HTML used to generate the layout
mikeday
What if you remove the "overflow: hidden" and specify "width: 58%" for .left divs?

We will investigate the layout differences with the browser.
jhoweaa
The issue is that I don't want the left divs to always be 58%. The idea is that the left divs would be as wide as they could be (up to 100% of the page width), but would be reduced in width when they bump up against the table we show on the right.