Printer Friendly Pages With a Header on Every Page?

孤街浪徒 提交于 2020-01-05 05:11:11

问题


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.


回答1:


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;
}


来源:https://stackoverflow.com/questions/518163/printer-friendly-pages-with-a-header-on-every-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!