Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shahin's avatar

I need to repeat the table heading on every printable page with jquery datatable on chrome?

In my page.blade.php I have a jQuery Datatable. Now I need to repeating table head every pages when I print the report. I've tried by using this

@media print { thead {display: table-header-group;} }

But I can't. Please tell me how can I add this in my project on every printable datatable reports? Now this table header showing on only top page (page one) when I print it, it doesn't showing other pages!!

0 likes
2 replies
Mbezdek's avatar

Hi, why you don't put this code directly into css file?

shimax's avatar
<table width="100%">
    <thead>
    <tr><th>column one</th><th>column one</th></tr>
    </thead>
    <tbody>
    @for($i = 1; $i < 50; $i++)
    <tr>
            <td>data</td>
            <td>data</td>

    </tr>
    @endfor
    </tbody>
</table>

Please or to participate in this conversation.