IE9标准模式在跨页面时不打印表体(tbody) [英] IE9 Standards mode not printing table body (tbody) when it spans pages

查看:86
本文介绍了IE9标准模式在跨页面时不打印表体(tbody)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,可以在数据库的表格中显示数据。我正在使用通过w3c验证器验证的XHTML过渡1.0标记。数据表可能非常大,有时在打印时会跨越多个页面。当表格有
来跨越多个页面时,IE 9将不会打印tbody元素(  )


或测试您的pint only layout将屏幕媒体添加到第二个链接

< link rel = "样式表"类型= QUOT;文本/ CSS" HREF =" ietbodybugglobal.css"媒体= QUOT;屏幕" /> 
< link rel =" stylesheet"类型= QUOT;文本/ CSS" HREF =" ietbodybugprint.css" media =" screen print" />

在测试后删除第二个屏幕媒体链接...


通常只有印刷媒体样式表比你的样式要简单得多....只包含样式规则来隐藏元素......你们都隐藏和展示元素....


隐藏一个块元素你需要display:none;可见性:隐藏,所以对应的显示:阻止;可见性:可见也需要在你的屏幕媒体中只有样式表链接。


OR


你只需将IE8 x-ua元标记添加到您的页面......(这可以通过使用Developer工具切换DocumentMode进行测试......您已经确认了这一点)... http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx


IE10的错误报告可以在
http://上发布connect.microsoft.com/ie


我认为您应该在连接时提出问题单,因为这是IE10中的错误,我们应该记录它以及解决方法其他人的利益......


有一些消费者对打印预览中缺少数据的抱怨......


如果你愿意我们可以筹集资金一张票并参考这个帖子。


问候。



I have a web page that displays data in a table from a database. I am using XHTML transitional 1.0 markup that validates through the w3c validator. The table of data can be quite large and will sometimes span multiple pages when printed. When the table has to span multiple pages, IE 9 will not print the tbody element (http://71.13.152.139/ietbodybug.html). When the table can fit on one printed page, IE 9 will print the tbody element (http://71.13.152.139/ietbodybug2.html). The second link is exactly the same page with less data. It does not matter if the page is rendered with compatibility view. It happens in both standard and compatibility view. When I go into the F12 Developer Tools and switch the Browser Mode to IE 8 or IE 7, the page prints correctly.

I have downloaded the Windows 8 Customer Preview and tested the web page in IE 10 desktop and the bug happens there as well.

解决方案

Hi,

thanks for the great question with links to your mashups... it didn't take long to see a possible reason and workaround....

Ie9 and higher has improved standards compliance. I think you have to add a media attribute to your screen css file.

<link rel="stylesheet" type="text/css" href="ietbodybugglobal.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="ietbodybugprint.css" media="print"/>

I was able to test the above using the Developer tool to add a media attribute to ietbodybugglobal.css link

and then selecting the File/Preview menu.

As you can see from my screen shots some more work has to be done by you to get the pint media layout correct. start by validating your css files (http://jigsaw.w3.org/css-validator/#validate_by_input )

or to test your pint only layout add a screen media to the second link

<link rel="stylesheet" type="text/css" href="ietbodybugglobal.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="ietbodybugprint.css" media="screen print"/>

remove the second screen media link after testing...

Usually the print media only stylesheet is a lot less complicated than yours.... containing only style rules to hide elements... you both hide and show elements....

to hide an block element you need both display:none; visibility:hidden, so the counterpart display:block;visibility:visible needs also to be in your screen media only stylesheet link.

OR

You can just add the IE8 x-ua meta tag to your page... (this can be tested by toggling the DocumentMode using the Developer tool... you have already confirmed this)...http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx

Bug reports for IE10 can be posted at http://connect.microsoft.com/ie

I think you should raise an issue ticket at connect as this is a bug in IE10 and we should document it and also the workaround for the benefit of others...

there are a few consumer complaints about missing data in Print Previews...

If you like we can raise a ticket and refer back to this thread.

Regards.


这篇关于IE9标准模式在跨页面时不打印表体(tbody)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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