Heading Levels and Page Breaks (CSS)

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Robotman
Sr. Propeller Head
Posts: 186
Joined: Sat Mar 04, 2006 3:05 am
Location: Melbourne, Australia
Contact:

Heading Levels and Page Breaks (CSS)

Post by Robotman »

Greetings. :)

Ok, I'm confused.

When I have the following code, the <h2> appears on the second PDF page followed by the table.
<p>text</p>
<h2>Heading Text</h2>
<table>Table</table>

Note: The <h2> can be any heading level.

But when I have
<p>text</p>
<h2>Heading Text</h2>
<p>text</p>

<table>Table</table>

Then the pages flow perfectly without a page break.

I have added the Page Break avoid to the CSS in case that was the problem. Didn't fix the issue.

Why?
\m/ Gary \m/
Flare 2024
Screaming Symphony
carolynmwallace
Sr. Propeller Head
Posts: 168
Joined: Thu Jan 31, 2008 12:21 pm
Location: Durham, NC

Re: Heading Levels and Page Breaks (CSS)

Post by carolynmwallace »

Well, I don't see any issues in the code you posted. That indicates a stylesheet problem to me. (Unless there's a Flare 5 table/heading bug I don't know about.) :wink:

You said you added page break avoid: was that to the heading class or the table class?

Also, could you open your stylesheet in the text editor and copy and paste your table and heading styles into a post? That would give us more to work with.
Robotman
Sr. Propeller Head
Posts: 186
Joined: Sat Mar 04, 2006 3:05 am
Location: Melbourne, Australia
Contact:

Re: Heading Levels and Page Breaks (CSS)

Post by Robotman »

(sorry, I'll post those when I can - I'm in the middle of heavy deadline schedule as all of our software is meant to be delivered this week)
\m/ Gary \m/
Flare 2024
Screaming Symphony
forfear
Propellus Maximus
Posts: 766
Joined: Sat Feb 16, 2008 3:37 am
Location: Jungle Jingles

Re: Heading Levels and Page Breaks (CSS)

Post by forfear »

Here's a tip,
set a page-break-inside:avoid
to a div.
for print
If you want to keep a section of text comprising more than two paragraphs together
sometimes its good to enclose it in a div.
This div.section you can set the
page-break-inside: avoid

basically this will give tells Flare's layout engine how to group sections as it parses your pages and flows text across a page.

DIV

Do give it a try Robotman.
Robotman wrote:Greetings. :)

Ok, I'm confused.

When I have the following code, the <h2> appears on the second PDF page followed by the table.
<p>text</p>
<h2>Heading Text</h2>
<table>Table</table>

Note: The <h2> can be any heading level.

But when I have
<p>text</p>
<h2>Heading Text</h2>
<p>text</p>

<table>Table</table>

Then the pages flow perfectly without a page break.

I have added the Page Break avoid to the CSS in case that was the problem. Didn't fix the issue.

Why?
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
Post Reply