Forum Bugs

footers dont display on every page

kburgess
Hello,

I'm not sure if this is a bug, or if something I'm not understanding correctly, but I'm having an issue getting my page footers to display on every page. So for example, if I have an html page with a lot of content which causes an auto page break, the footer is only displayed on the last page and not on every one.

I have added div#page-footer at the bottom of my html document, and then use the following CSS to display it:

@page {
@bottom-left{
content: flow(footer, last);
}
}
div#page-footer { flow: static(header); }


This method works correctly for page headers (showing on every page), but not for footers it seems. Can anyone please shed some light on this?
mikeday
When you flow an element to a margin box, it appears on the page it would have appeared on if it wasn't flowed, and following pages. So if the element is at the end of the document, it will only appear on the last page. This is so that you can change the headers/footers at different sections in the document.

If you specify "flow: static(header, start)" then it will apply it from the beginning of the document. We may replace this mechanism in future releases of Prince, but it works for now. Another option is to use JavaScript to move the element to the beginning of the document.
kburgess
Hey thanks, Mike. Works great!