Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Footer on last printed page

I have a web page that a client would like to print, and the part I'm having trouble getting my head around is to get the footer to sit at the bottom of the last printed page, not just when the content ends

I tried something like

 #printfooter{display: block; position:fixed; bottom: 0;}

but it displayed the footer at the end of each page.

Maybe Im asking a bit too much from CSS... Is it doable?

I'm thinking I should just go crazy with <br />'s (^_^)

like image 896
Assembler Avatar asked Jul 24 '09 10:07

Assembler


People also ask

How do I insert a footer at the end of the page?

html. < div id = "footer" >This is a footer. This stays at the bottom of the page.

How do I put the footer at the bottom of the last page only?

You can do that by putting a Section Break (Menu Bar > Insert > Break... > Section Break Next Page) at the end of the page prior to the last page of the document. Make sure the last page's footer is Unlinked from the prior page's footer.


1 Answers

Try to position the body relative and the footer absolute:

body {
    position: relative;
}
#printfooter {
    position: absolute;
    bottom: 0;
}

With CSS 3 Paged Media module you could use something like this:

@page:last {
    @bottom-center {
        content: "…";
    }
}
like image 137
Gumbo Avatar answered Sep 22 '22 07:09

Gumbo