Page Layout
Page size
Set the page margin such that all regular content fits in the page and there is enough space on the page borders for headers and footers. Page headers and footers should be inside the margin box to not overlap with text content.
1 2 3 4 |
|
Headers and Footers
Headers and footers are placed inside the page margin box (outside the regular page content).
To display headers and footers at a fixed position on every page use position: running(header)
in combination with content: element(header)
.
See:
- https://printcss.net/articles/running-headers-and-footers { target=_blank }
- https://www.w3.org/TR/css-gcpm-3/#running-syntax { target=_blank }
1 2 3 4 5 6 7 8 9 10 11 |
|
1 2 3 4 |
|
Hide headers on title page
Headers and footers are also rendered on the title page by default.
To hide them, override content
containing the element(header)
on the first page.
1 2 3 4 5 |
|
Page numbers
The page number is a built-in CSS counter that can be used in content
.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Page numbers can also be placed in footers together with additonal elements (see above).
The page counter then has to be used in a pseudo element such as ::before
or ::after
.
Pagebreaks
The easiest way to add a pagebreak is to include a <pagebreak />
component in the HTML template.
In CSS page breaks can be controlled with
1 2 3 4 5 |
|
Front Page Styling
The title page often is very different from the rest of the report, because it has no continuous text. Often, it contains the report title, a pretty background image and text blocks placed on specific locations not following any continuous text flow.
It is best to place element at specific offsets using position: absolute
in combination with top/bottom
and left/right
.
You may also want to disable headers and footers on the title page (described above).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|