How can i add footer with dynamic content? Now, if i try add footer with dynamic content it's will add only some lines not all. Several lines is cut.
Forum › How do I...?
Add footer with dynamic content
I'm add footer like this. I need fix margin from bottom
@page :nth(1) {
@bottom {
content: flow(footer);
margin-bottom: 20px;
}
}
#footer-template {
flow: static(footer)
}
<div id="footer-template">(dynamic text from PHP)</div>
But if text have dynamic number of lines, some of line is cut.
@page :nth(1) {
@bottom {
content: flow(footer);
margin-bottom: 20px;
}
}
#footer-template {
flow: static(footer)
}
<div id="footer-template">(dynamic text from PHP)</div>
But if text have dynamic number of lines, some of line is cut.
In that case I'm afraid it will be necessary to use a different mechanism than margin boxes, perhaps a page float instead with "float: bottom".
If you know the maximum number of lines, you simply can make the bottom margin box high enough to fit the maximum number of lines, which may appear, and then just align the text within the margin box.