htmlcssprintingheader

Displaying A Different Header on the First Printed Page with HTML and CSS


Is it possible, with any mix of HTML and/or CSS, to display one header on the first printed page and then display a different header on each subsequent printed page? I know about the @media print CSS tag to only display something when the site is printed, but that doesn't get me to having different headers on multiple pages.

Any help is appreciated, thanks!


Solution

  • from http://css-discuss.incutio.com/wiki/Printing_Headers

    If you want full, CSS-controlled print headers and footers, you'll need to wait until browsers implement support for the CSS3 Paged Media Candidate Recommendation. It explicitly provides for the facility but in a quite different way, using margin boxes.

    probably because...

    ... the CSS description of position: fixed, [is] namely "... In the case of the print media type, the box is rendered on every page, and is fixed with respect to the page ..." [Section 9.3.1]

    ...but the article says it doesn't work as of these days.

    BUT, to help you, later the article says:

    Setting a top margin on body (for example) will work only for the first page.