IE 打印 CSS 和跨页符

发布于 2024-08-08 06:44:24 字数 328 浏览 2 评论 0原文

我一直在努力解决打印 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

秋意浓 2024-08-15 06:44:24

对我来说,问题是我为主容器 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.

心碎无痕… 2024-08-15 06:44:24

看起来是表格的问题,但可能只是嵌套,但它是一个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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文