0

I would like to show header and footer on page during print. So the I use code which is:

<table align="center">
    <thead style="display: table-header-group;">
        <tr>
            <td>
                Header
            </td>
        </tr>
    </thead>
    <tbody> Body data</tbody>
    <tfoot style="display: table-footer-group; bottom:0;">
    </tfoot>
</table>

Header and content are shown correctly. Footer also show is correct as at the end of each page. But Issue is when last page content only one line, footer show after that line instead of page bottom.

nashcheez
  • 5,067
  • 1
  • 27
  • 53
  • Possible duplicate of [Print table footer at the very bottom on last page](http://stackoverflow.com/questions/33448846/print-table-footer-at-the-very-bottom-on-last-page) – xhg Apr 10 '17 at 07:31
  • You should take a look at [DoctorDestructo's answer](http://stackoverflow.com/a/33642115/2361752) – xhg Apr 10 '17 at 07:32
  • Can you create a demo or a fiddle? – nashcheez Apr 10 '17 at 07:45

1 Answers1

-3

rename your index.html in index.php. Create a footer.php. Insert your footer code in the footer.php

Go into your index.html and add the following code to the section where you want to add your footer:

<?php

include 'footer.php';

?>
Dierig Patrick
  • 168
  • 2
  • 20