Forum Bugs

table auto row height adjustment problem

pestafo
I have a table with a fix height. All rows except one have also a height defined. The sum of the row heights is together less than the height of the table.

Instead of increasing only the height of the row with no height definition, Prince adjusts all rows to an equal height to fill the table.

<html>
  <head>
    <title>sdfs</title>
  </head>
  <body>
    <table style="border: 1px solid red; height:200mm;">
      <tr style="height: 1mm;"><td style="border:1px solid green;">text</td></tr>
      <tr style="height: 1mm;"><td style="border:1px solid green;">text</td></tr>
      <tr style="height: 1mm;"><td style="border:1px solid green;">text</td></tr>
      <tr><td style="border:1px solid green;">text</td></tr>
    </table>
  </body>
</html>


Thanks for your support.
mikeday
Thanks, we'll take a look at this issue.
mikeday
It turns out that the behaviour of row height distribution on tables is actually not defined by CSS 2.1, and it doesn't look as if we can make Prince behave like the browsers due to limitations imposed by our need to break tables across multiple pages in some circumstances. (Normally blocks with a specified height don't break across pages, but height on tables is treated as a minimum height whereas height on other blocks is treated as a maximum height).
pestafo
After reading your response I assume that there is no workaround with something like a magic combination of height, min-height and max-height.
mikeday
I don't think so, as height on tables and table rows is basically equivalent to min-height, and you don't know the true height of the fixed rows (ie. they're actually larger than 1mm) so you can't give a fixed size for all of them. If the variable row is always the last one in the table you could perhaps take it out of the table, and use a fixed height container block instead?