omega
omega

Reputation: 43913

How to always have a header on top of each page when printing?

In my website, I have a really tall table spanning multiple pages when printing. Is there a way I can have the header row, show on top of each page when printing?

Upvotes: 0

Views: 70

Answers (3)

Abhay Srivastav
Abhay Srivastav

Reputation: 774

Give your head row

position :fixed

Now it will be repeated on every page.

Source - https://makandracards.com/makandra/4845-repeat-an-element-on-every-printed-page-with-css

Upvotes: 0

llessurt
llessurt

Reputation: 636

Most browsers do this automatically.

<table>
    <thead>
        <tr><th>Your header row repeats on every page.</th></tr>
    </thead>
    <tbody>
        <tr><td>Your body rows will fill the pages.</td></tr>
    </tbody>
</table>

Upvotes: 3

AlienBuster
AlienBuster

Reputation: 73

Yes, for that you can use the media print and just include this in every page :)

http://edutechwiki.unige.ch/en/CSS_for_print_tutorial

Upvotes: 0

Related Questions