D
D
Dima2014-10-14 06:40:50
css
Dima, 2014-10-14 06:40:50

How to insert your header and footer when printing?

Essence:
When printing, at the bottom of each page, you need to display a certain text (footer)
The amount of HTML is unknown in advance.
Can this be done somehow?
The @page rule specifies only indents within printed pages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Klusevich, 2014-10-14
@MAXOPKA

It is necessary to break the content into blocks with max-height (sheet height) and add text at the end of the block, and set the page-break-before: always property to the block; .

<style>
.article{page-break-before: always; }
</style>

<div class="article">
бла бла бла
<div class="colonticul">
бла бла
</div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question