Forum How do I...?

How to mimic @page:last (change footer for last page)

mark_anderson_us
Hi All

Am working on a doc that will span multiple pages. On all pages except the last one, I want "cont/..." at the bottom of the page.

Only way I can figure out how to do it is put in in the footer, but then I need to change the footer for the last page. Any tricks for this?

Regards

mark
mikeday
Using a named string that you clear at the end of the document is one way:
<style>
@page {
    @bottom {
        content: string(footer)
    }
}

body { string-set: footer "Continued" }

#last { string-set: footer "" }
</style>
...
<body>
...
<div id="last"></div>
</body>
mark_anderson_us
Hi Mike

Thanks for the reply. Not sure if the suggested solution will work because the footer is a div (lots of other stuff in there). Sorry should have mentioned in original post, but when I remove "continued..." I need to remove other stuff too. Basically, it's swapping out a footer.

Regards

mark
mikeday
The same technique should work with flowing content to the footer, just make the empty div at the end flow itself as an empty footer.