IE8表打印问题 [英] IE8 Table Printing Problem

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

问题描述

我在网页中有表格数据,如果打印则会打印在多个页面上。该表有六个字段/列。问题是,乍一看,它似乎在前导页面上打印最后一行数据的上半部分,但实际发生的是它打印该行数据的第一个字段的上半部分然后在下一页打印没有第一个字段中的数据的同一行数据(即在下一页上,它打印的第一行表数据包含正确列出的其余五个字段,但第一个字段为空)

要复制此问题创建一个网页,其中包含一个表格,该表格在打印时将跨越多个页面。然后进行打印预览或打印页面。

这在IE7和所有版本的FF中工作正常。

I have table data in a webpage that will print on multiple pages if printed. The table has six fields/columns. Problem is that on first glance, it appears to print the top half of the last row data on leading pages but what actually happens is that it prints the top half of the first field of that row data and then on the next page it prints the same row of data without the data in the first field (i.e. On the next page, the first row of table data it prints contains the remaining five fields listed correctly but the first field is empty)

To replicate this issue create a webpage with a table containing data that when printed will span multiple pages. Then either do a print preview or print the page.

This works fine in IE7 and all versions of FF.

推荐答案

我在IE8中遇到了相同的表打印问题。答案可以在以下网址找到:

http:// msdn.microsoft.com/en-us/library/cc304067(VS.85).aspx

具体而言,我这样做是为了解决问题:


< meta http-equiv =" X-UA-Compatible"含量=" IE = 8英寸/>

I had the same table printing problem in IE8.   The answer can be found at:

http://msdn.microsoft.com/en-us/library/cc304067(VS.85).aspx

Specifically I did this to remedy the problem:


<meta http-equiv="X-UA-Compatible" content="IE=8" />

< style type =" text / css">
@media print {
table.tr {
page-break -inside:avoid;
}
}< / style>

注意:您必须在页面中添加元标记或它不起作用。

<style type="text/css">
@media print {
    table.tr {
        page-break-inside: avoid;
    }
}
</style>


Note: You have to add the meta tag in your page or it won't work.


这篇关于IE8表打印问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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