By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,719 Members | 1,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,719 IT Pros & Developers. It's quick & easy.

Page break for printing

P: n/a
I have a page that I'm making for the sole purpose of printing and this page
makes 1.5 printed pages. Is there a way to force a print page break at a
specific place so when the user prints the page, it wont arbitrarily break
in the middle of a table or line of text?

Thanks.

--
mo*******@nospam.com
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Moondaddy,

As for the adding a page break in a web page you mentioned, I've done some
research and find that there is a
" page-break-after" css property that we can use in web page. This property
can be used in html element and force the page to break when it is printed
out. For example:
<html>
<body>

This is the text for page #1.

<p style="page-break-before: always">

Page #2...

<p style="page-break-before: always">

Page #3...

</body>
</html>
For detailed description, you can view the following reference:

#The page-break-after property
http://www.w3schools.com/css/pr_print_pageba.asp

#How do I put page breaks in a web page
http://www.chami.com/tips/internet/052898I.html

#Notice that this css propety is not supported by all the browsers and it
recommended to be used as less as possible.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2

P: n/a
Thanks thats great!

--
mo*******@nospam.com
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:Zc**************@cpmsftngxa06.phx.gbl...
Hi Moondaddy,

As for the adding a page break in a web page you mentioned, I've done some
research and find that there is a
" page-break-after" css property that we can use in web page. This property can be used in html element and force the page to break when it is printed
out. For example:
<html>
<body>

This is the text for page #1.

<p style="page-break-before: always">

Page #2...

<p style="page-break-before: always">

Page #3...

</body>
</html>
For detailed description, you can view the following reference:

#The page-break-after property
http://www.w3schools.com/css/pr_print_pageba.asp

#How do I put page breaks in a web page
http://www.chami.com/tips/internet/052898I.html

#Notice that this css propety is not supported by all the browsers and it
recommended to be used as less as possible.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.