html - Css 分页符在 IE 中的表格后导致额外的分页符

标签 html css internet-explorer-8

我有以下 html 文件...这些是全部内容:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<style type="text/css">
    P.breakhere
    {            
        page-break-after: always;
    }
</style>
<title></title>
</head>
<body>
<table>
    <tr>
        <td>
            [Contents of page 1]
            <p class="breakhere" style="width: 100%; text-align: right; font-weight: bold;">
                Continued...
            </p>
            [Contents of page 2]
        </td>
        </tr>
    </table>
    [More of page 2]
</body>
</html>

这是在安装在 Windows 7 Professional SP1 上的 IE 8(版本:8.0.7601.17514)中打印为 3 页

这应该只打印为 2 页,但在表格元素关闭后插入了一个额外的分页符。

有什么建议吗?

最佳答案

在表格内的元素上设置分页前(或分页后)存在问题。

没有解决方法。它会导致意想不到的行为。我不得不更改页面布局以避免此问题。

关于html - Css 分页符在 IE 中的表格后导致额外的分页符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11016280/

相关文章:

html - 如何将列从导航栏拉伸(stretch)到窗口底部?

css - Transform 在 Safari (iOS) 上放大图片

javascript - firefox 使用 jQuery animate 方法和绝对位置的奇怪行为

Java 7 update 11 在 IE8 上使用 Apache Tomcat 6.0.36 破坏了 webb 应用程序

html - 垂直旋转后表td内容出td

javascript - 在 IOS 设备上填充快速类型栏选项

javascript - 使用 Javascript 更改带有子按钮的父类

javascript - 如何在 HTML 表格中获得这样的布局

html - IE7 不支持视差 CSS 效果?

javascript - IE8 与 IE9 兼容性