Can I insert page breaks?

P

plh

Is it possible to put page breaks in a web page, so that when someone
prints it, I can keep from splitting up tables? Similar to what one
does with MS Word? The problem I have is this: small tables separated
by text, and the tables often get broken up (begin at the bottom of
one page and resume at the top of the next) when the page is printed.
Thank You,
Paul H
I keep hitting "Esc" -- but I'm still here!
[if "123" is in email address, that is an anti-spam thing.]
 
J

Jim Buyens

-----Original Message-----
Is it possible to put page breaks in a web page, so that
when someone prints it, I can keep from splitting up
tables? Similar to what one does with MS Word? The
problem I have is this: small tables separated by text,
and the tables often get broken up (begin at the bottom
of one page and resume at the top of the next) when the
page is printed.

Add this attribute to your <table> tag
style="page-break-inside: avoid; "

If this isn't exactly what you need, browse
http://www.w3.org/TR/CSS2/page.html#page-break-props
for more possibilities.

Also, a warning: browser support for page-break
properties is uneven.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
A

Andrew Murray

The splitting of tables as you describe could also have more to do with your
printer margins rather than just page breaks.....in I.E. you can print-preview
and adjust page margins and so on - I would adjust the margins until it looks
"right" and test print.

Be aware though user's printers will differ and the output will differ. If you
want to,there should be an alternative to create a "printer friendly page" like
you see everywhere - even if you link to a word document (assuming the user has
got Word......) or a PDF file. (assuming you have Acrobat to be able to create
PDF's and that the user has Acrobat reader.....

Maybe Word or PDF would be the way to go - if you want to preserve your table
formatting.
 
N

Nomad

Okay, (me) being relatively new at this, how would one code a 'printer
friendly page' Andrew?
 
P

plh

Hello Jim,
Thank you for responding.
I tried that (style="page-break-inside: avoid; ") but it does not seem
to work. Maybe I am applying it wrong. Here is what I have:
</FONT>
<U>
<TABLE BORDER CELLSPACING=1 CELLPADDING=7 WIDTH=655
style="page-break-inside: avoid; ">
<TR>

(Line beginning "<TABLE BORDER" ends "avoid; ">" that is not wrapped
as it may appear here).
Thank you,
-plh

Add this attribute to your <table> tag
style="page-break-inside: avoid; "

If this isn't exactly what you need, browse
http://www.w3.org/TR/CSS2/page.html#page-break-props
for more possibilities.

Also, a warning: browser support for page-break
properties is uneven.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------

I keep hitting "Esc" -- but I'm still here!
[if "123" is in email address, that is an anti-spam thing.]
 
J

Jim Buyens

plh said:
Hello Jim,
Thank you for responding.
I tried that (style="page-break-inside: avoid; ") but it does not seem
to work. Maybe I am applying it wrong. Here is what I have:
</FONT>
<U>
<TABLE BORDER CELLSPACING=1 CELLPADDING=7 WIDTH=655
style="page-break-inside: avoid; ">
<TR>

(Line beginning "<TABLE BORDER" ends "avoid; ">" that is not wrapped
as it may appear here).
Thank you,
-plh

Just offhand, that looks correct. Again, if that's not producing
the results you want, browse
http://www.w3.org/TR/CSS2/page.html#page-break-props
for more possibilities.

And again, support for page-break properties varies widely
among browsers.

Personally, I try to keep Web processes 100% on line. This
avoids any need to print.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top