W3C home > Mailing lists > Public > www-html@w3.org > January 2000

RE: printing html

From: Chris Wilson <cwilso@MICROSOFT.com>
Date: Fri, 28 Jan 2000 12:22:34 -0800
Message-ID: <C35556591D34D111BB5600805F1961B91D5CDE2E@RED-MSG-47>
To: "'ben van't ende'" <argument@telekabel.nl>, www-html@w3.org
ben van't ende [mailto:argument@telekabel.nl] wrote:
>...For every page
>that is printed i'd like to have a header containing several
>items like article number etc. and a footer containing date
>etc. I tried using THEAD-TBODY-TFOOT, but in some way this
>doesn't seem to work. i'm probably overlooking something.

Using Internet Explorer 5.0+, you can do this, but it requires CSS.  Set up
your page as you describe above, using THEAD and TFOOT to contain table
header and footer information.  Now, on the THEAD element, put the CSS
stylesheet property setting "display: table-header-group" and on the TFOOT
element put the CSS stylesheet property setting "display:
table-footer-group" (you can set this through an inline style or a
stylesheet), like this:

<THEAD STYLE="display: table-header-group">
<TD>This header will display on every printed page</TD>
<TD>This is where the data rows go...</TD>
<TFOOT STYLE="display: table-footer-group">
<TD>This footer will display on every printed page</TD>

This stylesheet setting was necessary because we'd already implemented
support for THEAD and TFOOT sections, and some customers became distraught
in one of our betas that their printouts suddenly "looked weird".

You can, of course, put two rules like
	THEAD { display: table-header-group }
	TFOOT { display: table-footer-group }
into your user stylesheet to always get this behavior on your own machine.

-Chris Wilson
Received on Friday, 28 January 2000 15:24:49 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:38 UTC