Page breaks revisited

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
BedfordWriter
Sr. Propeller Head
Posts: 231
Joined: Wed Jun 23, 2010 10:13 am
Location: Nova Scotia

Page breaks revisited

Post by BedfordWriter »

I'm having trouble with page breaks when printing from a TopNav topic. Certainly not the first, as I've found by searching the forums, but the conventional solutions don't seem to be working.

My Styles.css file includes the following in the @media print section:

Code: Select all

	p
	{
		page-break-inside: avoid;
	}
	td
	{
		page-break-inside: avoid;
	}
	tr
	{
		page-break-inside: avoid;
	}
But, not only am I getting page breaks within paragraphs and rows, I'm getting them in the middle of sentences. The top half of a word will be on one page and the bottom half on the next. Any suggestions?
Rene Severens
Sr. Propeller Head
Posts: 210
Joined: Mon Sep 19, 2011 2:06 am
Location: Netherlands - Zoetermeer
Contact:

Re: Page breaks revisited

Post by Rene Severens »

Hi,

I never use a p style to set a page break, but select that specific p-block for that text, and in menu Paragraph, set the property pagebreak before or page break after depending on what is needed. I add a comment in the code to remind me what I did, so in case of an edit, I know to adjust that pagebreak.

It seems that the text you see split in half is somehow seen as the start will still fit on the body space set on the page and the set pagebreak in the p-tag tries to keep that text on the same page, but there is not enough body space to show the complete text, thus the upper half is shown at the end of the first page and the lower half is started on the next page. In fact the complete text for this p-tag should have been moved to the next page.

Greetings,
Rene Severens
"The numbers are strange today; they somehow do not seem to add up."
BedfordWriter
Sr. Propeller Head
Posts: 231
Joined: Wed Jun 23, 2010 10:13 am
Location: Nova Scotia

Re: Page breaks revisited

Post by BedfordWriter »

Thanks for that. It will work with smaller projects, but not for my 4000+ topic project, in which many topics can run to five or six printed pages.

Still looking for something a bit more automatic.
BedfordWriter
Sr. Propeller Head
Posts: 231
Joined: Wed Jun 23, 2010 10:13 am
Location: Nova Scotia

Re: Page breaks revisited. Solved.

Post by BedfordWriter »

(sigh) I will not use position: absolute; or position: relative;. I will not use position: absolute; or position: relative; ...

... which of course I did use for two key elements of the page layout, during a misguided attempt to tweak the appearance of my project when I first converted it to TopNav.

After removing both position tags, nothing moved on the screen and the line breaks now occur between sentences and images, rather than slicing them.
Post Reply