IE 打印 CSS 和跨页符
我一直在努力解决打印 CSS 和 IE 的问题,在横向模式下打印时,内容会消失。
问题似乎在于,我尝试打印的元素(其中包含内容的大 DIV)在进入横向模式时跨越了两页。发生的情况是,当元素跨越两页时,第一页是空白的,第二页正在打印通常从第一页留下的内容。
我认为这与包含的浮动有关:
wrapper div 浮动div1 floated div2
如果我在打印CSS文件中将两个嵌套的div设置为float: none,那么IE将打印它们,尽管不是我们想要的布局。
在我再花一个小时讨论这个问题之前,有人知道具体是什么问题以及是否有已知的解决方法?
I've been working on trying to fix an issue with print CSS and IE where things would disappear when printing in landscape mode.
It appears the issue is that the element I'm trying to print (a large DIV with content inside it) spans two pages when put into landscape mode. What is happening is when the element spans two pages, the first page is blank, and the second page is printing what would normally be left over from the first page.
I think it's related to contained floats:
wrapper div
floated div1
floated div2
If I set the two nested divs to float: none in the print CSS file, then IE will print them, albeit not in the layout we'd like.
Before I spend another hour on this, anyone know what, specifically, is the issue here and if there's a known workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对我来说,问题是我为主容器 div 设置了 display:inline-block 。这与声明宽度一起是一种使父 div 扩展以包含内部浮动的方法。
我删除了 display:inline-block 并使用clearfix 代替。问题已解决。
The problem for me was that I was setting display:inline-block for the main container div. This along with declaring a width is a method to make a parent div extend to contain the floats inside.
I've removed display:inline-block and used clearfix instead. Problem fixed.
看起来是表格的问题,但可能只是嵌套,但它是一个IE错误。
http://support.microsoft.com/?kbid=257097
仍在尝试自己解决该问题。
It seems to be a problem with tables, but it may just be the nesting, but it is an IE bug.
http://support.microsoft.com/?kbid=257097
Still trying to work around the problem myself.