473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Printing: widow/orphan control

I need to define paragraphs on my site that should not break across a
page when printed, similar to widow/orphan control in Word. Is this
possible to implement? We only use IE6 so no cross-platform is
required.

Thanks
James
Jul 20 '05 #1
3 10534
ja**************@hotmail.com (James) wrote:
I need to define paragraphs on my site that should not break across a
page when printed, similar to widow/orphan control in Word. Is this
possible to implement? We only use IE6 so no cross-platform is
required.


Bad news first: there is no nice way.

In theory, CSS 2 gives us the properties widows and orphans. For example,
p { widows: 3; orphans: 3; }
says that a browser should not separate one or two lines from the rest of
paragraph into a separate page. But as far as I know, only Opera supports
this.

And CSS also lets you say
p { page-break-inside: avoid; }
to simply suggest that no paragraph be split across pages. But IE doesn't
support this either.

What works is "positive" page-break settings like
p.newpage { page-break-before: always; }
but this gets awkward, since you would need to decide and guess where
page breaks should appear and write markup like
<p class="newpage">...</p>
and the page breaks could appear at odd places, when font size, paper
size, etc., differ essentially from the expectations.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
On 3 Aug 2004 03:56:57 -0700, ja**************@hotmail.com (James)
wrote:
I need to define paragraphs on my site that should not break across a
page when printed, similar to widow/orphan control in Word. Is this
possible to implement?
Yes.
We only use IE6 so no cross-platform is
required.


Oh dear. In that case you'll have to upgrade to a decent browser first.
(Actually I believe Opera is the only one to support page-break-inside
at present.)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #3
In <61**************************@posting.google.com >, on 08/03/2004
at 03:56 AM, ja**************@hotmail.com (James) said:
I need to define paragraphs on my site that should not break across a
page when printed, similar to widow/orphan control in Word. Is this
possible to implement?


Define styles with appropriate values for orphans, page-break-inside
and widows, e.g.,

div.res dl dt {
font-weight: bold;
line-height: 3;
orphans: 4;
text-decoration: underline;
widows: 3; }
div.res dl dd { font-size: medium; }
div.res p {
orphans: 4;
page-break-inside: avoid;
widows: 3; }

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to sp******@library.lspace.org

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Thorne | last post by:
Have 2 tables ts_sheets : TimeSheet_ID TimeSheet_Date Emp_ID Orphan LineItem TimeSheet_ID Client
9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
4
by: Domel | last post by:
What is the difference betweent the two concepts?? thx.
0
by: net guest via DotNetMonster.com | last post by:
Hi, i am facing a lot of problems in killing the orphan excel instances. I approached one method like killing the Excel Orphan with processID. I am getting all the Processess that are running...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Rick Lederman | last post by:
I am using a PrintDocument and PrintDialog to print. The first time that I print it works, but when I try to print a second time without exiting the entire program I get an...
1
by: Gunnar | last post by:
Are there any way of detecting that a program have crashed and left an orphan file? I have tried with the filesystemwatcher, but that didn't work. Maybe I can use a polling strategy and keep...
3
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. Is there a way to create a registry key, but orphan it from the program that created it? Reason: Create a key, but not associate it with the...
2
by: smilem | last post by:
Hi, I use Gallery2 v2.3 system on my web server. When I add and delete photos I see orphan records in my db. The project is opensource and developers are focused on new v3 of the product. However...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.