DOC: Page Break Styles Supported Only with Block Elements

Last reviewed: February 12, 1998
Article ID: Q180856
The information in this article applies to:
  • Internet Client SDK, versions 4.0, 4.01
  • Microsoft Internet Explorer (Programming), versions 4.0, 4.01

SUMMARY

The Internet Client SDK contains an example of how to use the page-break- after CSS style to force Internet Explorer to insert a page break when printing an HTML document. This example is incorrect because it uses a BR tag, which is not a block element. The following example is documented in the Dynamic Styles, Style Sheets and Printing topic of the Dynamic Styles section of the Internet Client SDK online help:

   <HTML>
   <HEAD><TITLE>Dynamic Styles: Page Breaking</TITLE>
   <STYLE>
       BR.page { page-break-after: always }
   </STYLE>
   </HEAD>
   <BODY>
       .
       content on page 1
       .
   <BR CLASS=page>
       .
       content on page 2
       .
   </BODY>
   </HTML>

In the above example, no page breaks are generated when this document is printed from Internet Explorer. Replace the <BR> tag and BR.page style definition with a <P> tag and P.page style to achieve the correct behavior.

MORE INFORMATION

The page-break-before and page-break-after CSS styles enable a Web author to insert page breaks when the document is printed from Internet Explorer.

These styles only work with the following block elements: BLOCKQUOTE, BODY, CENTER, DD, DIR, DIV, DL, DT, FIELDSET, FORM, Hn, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, UL, and XMP.

This limitation also applies to the pageBreakBefore and pageBreakAfter properties of the Dynamic HTML style object.

REFERENCES

See the Dynamic Styles, Style Sheets and Printing topic of the Dynamic HTML section in the Internet Client SDK online help:

   http://www.microsoft.com/msdn/sdk/inetsdk/help/


Additional query words: CSS stylesheet
Keywords : AXSDKIESripting kbdocerr
Technology : kbinetdev internet
Version : WINDOWS:4.0,4.01
Platform : WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 12, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.