Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there a way to print a footer on every page printed from a single web page?

1 view
Skip to first unread message

Allan Horwitz

unread,
Nov 14, 2000, 3:00:00 AM11/14/00
to

Is there a way to print a predefined footer for every page printed from a
single web page?

For example, if I print a web page that uses 10 sheets of paper (10 pages)
there should be 10 footers (one on every page that prints), but on the web
page, the footer only appears at the bottom.

I can not pre-define the page breaks, so adding the footer manually is not
an option.

I may be able to implement a repeating background image (watermarks) that
display the footer message only on the printed media. The problem here is
that I would prefer to use a footer rather than a distracting watermark.

Allan Horwitz

Samuli Lintula

unread,
Nov 14, 2000, 3:00:00 AM11/14/00
to
In article <#gkMoQlT...@cppssbbsa02.microsoft.com>, Allan Horwitz wrote:
>Is there a way to print a predefined footer for every page printed from a
>single web page?
>
>For example, if I print a web page that uses 10 sheets of paper (10 pages)
>there should be 10 footers (one on every page that prints), but on the web
>page, the footer only appears at the bottom.
>
>I can not pre-define the page breaks, so adding the footer manually is not
>an option.

You could do it with fixed positioning, but IE doesn't support it in
(Hey developers! Fix it!) screen mode (Opera and Netscape6 should
support it). I don't know about printing though.

http://www.w3.org/TR/REC-CSS2/visuren.html#fixed-positioning
"For paged media, boxes with fixed positions are repeated on
every page. This is useful for placing, for instance, a
signature at the bottom of each page."


--
Samuli Lintula
samuli....@utu.fi http://users.utu.fi/saklint/
University of Turku - Department of Biochemistry

Allan Horwitz

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
Have you worked with fixed positioning before?

If so, I could sure use some additional samples.

Allan


"Samuli Lintula" <sak...@alya.utu.fi> wrote in message
news:slrn91340n....@alya.utu.fi...

Allan Horwitz

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
The problems I am having with using fixed positioning as a solution is that
I can't get it to work (IE5.0). Whenever I try to tell the footer to go 10px
from the bottom of the page, I see no change on the printed page.

<HTML><HEAD>
<TITLE>CSS2</TITLE>
<STYLE type="text/css">

@media screen
{
.printonly { display: none; }
}
@media print
{
.screenonly { display: none; }
}


BODY { height: 8.5in 11in} /* Required for percentage heights below */
#footer {
position: fixed; bottom: 10px; width: 100%
/* position: fixed; */
/* width: 100%; */
/* height: 30; */
/* top: 300; */
/* right: 0; */
/* bottom: 0; */
/* left: 0; */
}
</STYLE>
</HEAD>
<BODY>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<DIV id="footer"> <FONT SIZE="-2"><CENTER>This site is for the exclusive
use of Synthes employees.</CENTER></FONT> </DIV>
</BODY></HTML>

"Allan Horwitz" <allanh...@hotmail.com> wrote in message
news:#AUeSSwTAHA.243@cppssbbsa04...

Samuli Lintula

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
In article <uzJc4ewTAHA.244@cppssbbsa04>, Allan Horwitz wrote:
>The problems I am having with using fixed positioning as a solution is that
>I can't get it to work (IE5.0). Whenever I try to tell the footer to go 10px
>from the bottom of the page, I see no change on the printed page.

IE doesn't support position:fixed . (And I'm really pissed off by that!)

Even with other browsers, you should use something like 3cm or so -
most printers wont allow really narrow margins.

><HTML><HEAD>
> <TITLE>CSS2</TITLE>
> <STYLE type="text/css">
>
> @media screen
> {
> .printonly { display: none; }
> }
> @media print
> {
> .screenonly { display: none; }
> }
>
> BODY { height: 8.5in 11in}
>

> #footer {
> position: fixed; bottom: 10px; width: 100%
> }

> </STYLE>
> </HEAD>
> <BODY>

<snip> I took away the linebreaks, since they are not needed when
you use fixed position.

> <DIV id="footer"> <FONT SIZE="-2"><CENTER>This site is for the exclusive
>use of Synthes employees.</CENTER></FONT> </DIV>
></BODY></HTML>

It should work. Putting the div at the end of the document is,
luckily, backward compatible: It will show either at the end of each
page, or at the end of the last page.

If you want to test how browsers support printing of fixed
elements, you can do that at http://www.w3.org/Style/CSS/ .


--
Samuli Lintula
samuli....@utu.fi University of Turku
http://users.utu.fi/saklint Department of Biochemistry
----------------------------------------
1. Varavaltuutettu (vihr.) http://www.geocities.com/slintula/


Allan Horwitz

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
Earlier you said that IE doesn't support fixed in screen mode. Now I see
that you are saying IE does not support fixed at all (I am assuming this
means print and screen mode). I just want to make sure I have it right. What
about position:static?

I should add that I am looking for an IE5 and up solution. Any other browser
is not my concern for this Intranet project.

Thank you for your help.

Allan Horwitz

"Samuli Lintula" <sak...@alya.utu.fi> wrote in message

news:slrn915nsn....@alya.utu.fi...

Allan Horwitz

unread,
Nov 16, 2000, 3:00:00 AM11/16/00
to
Seems that IE 5.5 does not support fixed positioning.

Maybe version 6 will support it.

Allan Horwitz


"Allan Horwitz" <allanh...@hotmail.com> wrote in message

news:#MDAgpzTAHA.242@cppssbbsa04...

0 new messages