RE: printing html

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:

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

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