Forum Bugs

table footnote keep

shivaram
Para after the table having page-break-before:avoid moves the entire table to next page.
<style type="text/css">
  table{
  	border-collapse: collapse;
  }
  td, th{
  	border:1px solid black;
  	padding:3px;
  }
  p.footnote{
  	color:red;
  	page-break-before:avoid;
  }
</style>

Kindly refer the attached pdf for the issue.

Here I want to keep the table footnote (para after table) with previous table without moving the entire table, so that footnote para will not be left alone on page boundaries..

Please suggest?
  1. index.html4.3 kB
  2. index.pdf58.5 kB
shivaram
Please let us know if this is a bug or if we can do any thing to break the table?
mikeday
Currently we don't have a mechanism to specify that you would prefer to break the table instead of moving it. In this situation you could explicitly insert a break before the last row in the table, but that would be very awkward as most of the time you don't want it to break there.

The only solution I can find is to place the footnote within a new tbody at the bottom of the table and disabling the borders for it:
tbody.footnote td { border: none; color: red }

<tbody class="footnote">
  <tr style="page-break-before: avoid">
    <td colspan="3">
      <p>table footnote text should be kept with previous table</p>
    </td>
  </tr>
</tbody>

This should work as long as the table does not require a footer, as the footer would display below the footnote.
shivaram
Thank you for the response Mike.

Moving footnote inside table seems to be little convincing for me. I have to play around with XSLT then :-)