Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q506

Feedback on: irt.org FAQ Knowledge Base Q506

Sent by Iain Havelock on April 18, 2000 at 19:07:57: - feedback #1112

Length:
Just right

Comments:
HTMLGoodies shows you how to do add page breaks with CSS.

http://www.htmlgoodies.com/beyond/css_print.html


Sent by Edward E. Hacker on May 23, 2000 at 14:05:59: - feedback #1276

Technical:
Not technical enough

Comments:
IE support a Style to force a
page break on printing.

I have seen this work using the
DIV tags.

For example:

<div style=page-break-before:always>

stuff on a new page

</div>


Sent by Doug Perry on October 25, 2000 at 15:21:10: - feedback #1910

Comments:
Yes, there is a way to force page breaks for a printer using HTML on a web page. Try this:

<DIV STYLE="page-break-before:always"></DIV>

Works on NN 4.5 and IE 5x every time.


Sent by Tom Austin on December 12, 2000 at 08:07:37: - feedback #2131

Length:
Too short

Technical:
Not technical enough

Comments:
Set this up as a Style:

<style media=print type=text/css>
DIV.pageBreakAfter { page-break-after: always }
DIV.pageBreakBefore { page-break-before: always }
</style>

You can use this style to encapsulate in a DIV what you want on a page.

For example:

<DIV id=divMyPage class=pageBreakAfter>
<h2>Header of stuff</h2>
<p>...stuff...</p>
<HR>
</DIV>

...this example will ensure that the printer does a page break AFTER the DIV.


Sent by John Blackmore on November 14, 2001 at 17:10:26: - feedback #3323

Worth:
Worth reading

Comments:
I just found a nasty caveat... table tags screw this up in IE 5.0.

Example:

I had a page with that looked like this:

<head>
<style media=print type=text/css> DIV.pageBreakAfter { page-break-after: always }
</style>
</head>
<body>
<table width=640 align="left" border=0 cellpadding="2" cellspacing=0 bordercolor="#000066">
<tr><td><div id=X class=pageBreakAfter>
Some text on page 1.
</div></td></tr>
<tr><td><div id=Y class=pageBreakAfter>
Some text on page 2.
</div></td></tr>
</table></body></html>

Guess what - it doesn't work! I made a very minute change - I stripped the tags on the table so it's just <table>. Now it adds page breaks where desired. Weird, huh? You don't want to know how many trees gave their lives to give me this information, so I'm giving it to you for free. :)



©2018 Martin Webb