My project has added a CSS to solve the paginationprinting problem
<style type="text/css"> @media print { xmp {page-break-before:always;} } </style>
When using it, just add the
But recently, in order to solve another problem, it was stipulated that IE8 cannot be set to the compatibility view. It was found that this method failed in the non-compatibility mode.
I tried it and found that this problem only occurs when using XHTML 1.x. The specific reasons will not be analyzed. There are many solutions1. Without the style tag, directly use Add style="page-break-before: always" somewhere, For example:<table style="page-break-before: always"> <tr> ... </tr> </table>
2.
<style> p.breakPage { PAGE-BREAK-BEFORE: always } </style> </head> <body> ... <p class='breakPage'></p>
The above is the detailed content of Solution to the failure of css page-break-before in IE8 non-compatible mode. For more information, please follow other related articles on the PHP Chinese website!