Avoiding page breaks between a graphic and it's intro

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
HelenF
Propeller Head
Posts: 56
Joined: Tue May 18, 2010 2:24 am

Avoiding page breaks between a graphic and it's intro

Post by HelenF »

Hi, I would like to find a way of avoiding page breaks between a graphic and it's preceding introductory statement, so that they are kept together on the same page. (I'm producing PDF output using Flare 8.)

I've tried setting page-break-before=avoid on the img class but that doesn't have any effect.

Can anyone suggest another way of controlling this?

Thanks
Helen
ajturnersurrey
Sr. Propeller Head
Posts: 348
Joined: Fri Nov 05, 2010 3:30 am

Re: Avoiding page breaks between a graphic and it's intro

Post by ajturnersurrey »

I always put my img inside a paragraph tag. The paragraph tag has page-break-before set to avoid. This has not given me any trouble. Though you would need to set it to 'never' if you really couldn't ever allow the two to ever get separated. 'Avoid' will try not to separate the pair, but if the two together creates more than one page of content or conflicts with the requirement to keep other elements together a break will be allowed.
HelenF
Propeller Head
Posts: 56
Joined: Tue May 18, 2010 2:24 am

Re: Avoiding page breaks between a graphic and it's intro

Post by HelenF »

Is there a page-break-before=never option? I can't see it.

Thanks
jasonsmith
Sr. Propeller Head
Posts: 205
Joined: Wed Apr 28, 2010 2:51 am

Re: Avoiding page breaks between a graphic and it's intro

Post by jasonsmith »

Another way is to create a div class where page-break-inside is set to avoid and group your image and descriptor in the div using Format>Group
HelenF
Propeller Head
Posts: 56
Joined: Tue May 18, 2010 2:24 am

Re: Avoiding page breaks between a graphic and it's intro

Post by HelenF »

Unfortunately the DIV idea won't work because my block elements are within a list - but I have found that setting "page-break-after: avoid;" on the intro element has the desired effect: the intro statement is moved onto the next page with the graphic.

Thanks for the suggestions.

Helen
flarenewbie
Propeller Head
Posts: 25
Joined: Thu Feb 16, 2012 9:47 pm

Re: Avoiding page breaks between a graphic and it's intro

Post by flarenewbie »

for the image style, set page-break-before=avoid.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Avoiding page breaks between a graphic and it's intro

Post by ChoccieMuffin »

Did you ever get this to work? I've tried the page-break-before: avoid thing on the paragraph my image is in, but that doesn't work, and it's not always possible to apply a page-break-after: avoid to the preceding paragraph.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply