Forum


Replies: 1   Views: 1668
Make table headers repeat on new page using embedhtml
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by seb  · 20-10-2020 - 09:06

Hello,

 

I'm using v10 Premium and I have a very long table that spans 3 pages which I insert using embedHTML(). Is it possible to make the headers repeat on each page? I understand I can do this with addTable(), but as I mentioned, I am just using HTML to make this table.

 

Thank you for your help.

Seb

Posted by admin  · 20-10-2020 - 09:40

Hello,

You can apply the following style to tr tags:

display:table-header-group;

to enable it. For example:

<style>
    .header-table {
        display:table-header-group;
    }
</style>
<table border="1" style="border-collapse: collapse" width="600">
  <tbody>
    <tr width="600" class="header-table">

Regards.