DOC: Page Break Styles Supported Only with Block Elements (180856)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
This article was previously published under Q180856 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:
Modification Type: | Major | Last Reviewed: | 10/2/2003 |
---|
Keywords: | kbdocerr kbprb KB180856 |
---|
|