Forum Bugs

page break with prince 9rev2

silouane
Hello,

I have a element with this style:

article.brief .content {
height: 180mm;
width: 170mm;
display: table-cell;
vertical-align: middle;
}

The content is aligned vertically on the page with prince 8.1 rev 5.

But with prince 9.0 rev2, there is a page break (empty page) before and after the content.
If i comment the line display: table-cell;, all is fine but my content is not aligned vertically.

Have got any idea which can solve my problem?

Thanks
mikeday
How big is the page? Can you reproduce the problem with a short sample document that you could include here?
silouane
Here is my page,
it's an A4 format, the red rectangle is my element with the class content.

It have been generated by prince 8.1ref5.

mikeday
Would you be able to email me (mikeday@yeslogic.com) the HTML/CSS?
rlaytham1
What was the resolution to this issue? I'm seeing something that looks similar in Prince 10.
mikeday
I cannot remember. :)

Are you specifying a fixed height property? Are there any page break properties involved? It might be easier to attach a small sample HTML document.
rlaytham1
Here's a pared down example of the document that I'm having trouble with. We have a number of similar documents throughout our application, and a complete rework is probably not realistic. If there's a simple fix to get these to render properly with Prince 10, that would be great.
  1. prince10issue.html0.5 kB
    Here's a pared down example
mikeday
That is super strange, we will take a look. Changing the inner div from table-cell to block appears to fix the problem, although the width: 8.5in is way too big unless it's on a landscape page.
rlaytham1
Unfortunately, changing the display from table-cell to block makes it so the div is no longer centered vertically.
mikeday
Right of course, that's why you had it in a table-cell in the first place. But the height in which it gets centred is only 1.1in tall?
rlaytham1
In this case, yes. In other cases the height of the box will be different.
mikeday
Adding a <div style="display: table"> inside the absolutely positioned block appears to fix the issue.

I think it's an interaction between the automatically generated anonymous table element and the absolute positioning.