打印页面每页有一个页眉? [英] Printer Friendly Pages With a Header on Every Page?

查看:177
本文介绍了打印页面每页有一个页眉?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在J2EE环境中使用一个显示大量表格数据的Web应用程序。我们希望能够在每个页面显示页眉和页脚的情况下打印这些表格。我知道一些浏览器通过thead,tbody,tfooter标签支持这一点,但用户只使用IE6。一行通常只有一行,但有时可能是两个或三个(也许更多)。



这里有什么我的选择?有没有一种我不知道的快捷方式?我是否需要如何计算一组行的高度?或者我坚持做一些静态的工作,希望大多数时间都能工作?



感谢您的任何帮助。

THEAD 和 TBODY 中做了正确的事情。>解决方案标签,但也尝试添加以下CSS定义:

  thead {
display:table-header-group;
}
tbody {
display:table-row-group;
}


I'm working in a J2EE environment with a web app that displays large amounts of tabular data. We want to be able to print these tables with each page displaying the header and footer. I understand some browsers support this through the thead,tbody,tfooter tags, but the users are using IE6 only. A row is normally only one line but on occasion can be two or three (maybe more).

What are my options here? Is there a quick and easy way that I'm not aware of? Do I need to some how "calculate" the height of a set of rows? Or am I stuck doing something static that will hopefully work "most of the time?"

Thanks for any help.

解决方案

You're doing the right thing in THEAD and TBODY tags, but try adding the following CSS definitions too:

thead {
    display: table-header-group;
}
tbody {
    display: table-row-group;
}

这篇关于打印页面每页有一个页眉?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆