-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different behavior for text and elements for margin boxes #661
Comments
This comment has been minimized.
This comment has been minimized.
Disregard my previous comment. It turns out that if you add the running elements as first children of the |
OK, after debugging, it seems this is by-design and as per the (somewhat confusing) paged media spec. The idea is that the value returned can be updated with multiple elements using the one running position. Take this html for example: <html>
<head>
<style>
@page {
size: 200px 200px;
margin: 20px;
@bottom-left {
background: blue;
content: element(footer);
}
@bottom-right {
background: red;
content: 'FOOTER-R';
}
}
.footer {
position: running(footer);
}
</style>
</head>
<body>
PAGE 1
<div class="footer">
FOOTER1
</div>
<div style="page-break-before: always;">PAGE 2</div>
<div class="footer">
FOOTER2
</div>
<div style="page-break-before: always;">PAGE 3</div>
<div class="footer">
FOOTER3
</div>
</body>
</html> When shown on the first page 'FOOTER1' is shown. On page 2, we reassign the footer running position to 'FOOTER2' and this is shown and so on. Therefore, if we remove 'FOOTER1', we can say that the running position for footer is unassigned on the first page and nothing is shown on that page. I did not know it worked this way so it's been a learning experience. I'll add a note to the wiki page. |
@danfickle, first of all, thanks for the quick reply |
Just add the footer element just after the opening |
After being placed at the beginning of the body tag it works, thanks! |
Components with text content are placed on every page, but components where content is element are shown only on the last page. How to add html content to the footer on every page?
The text was updated successfully, but these errors were encountered: