Hello people,
Im looking for a 'keep with next' option in Flare, where I can be sure the sentence sticks to the image after it...is there a way to do this in Flare?
TIA
Keep with next...please
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Keep with next...please
CSS doesn't have the concept of "keep with next." Rather, it has the concept of breaks before, inside, or after different HTML tags. You can design styles that always break or that avoid breaking. (There's no such concept as never breaking.)
To achieve the specific behavior you're after, you have a couple of options.
One way is to put the paragraph that holds the lead-in sentence and the paragraph that holds the image inside a div and assign the div class that includes the page-break-inside attribute set to "avoid". I use this exact div structure, with a class of div.Figure.
BTW, if you wanted to use a similar div structure for other kinds of content besides paragraphs with images, you could name the div more generally.
Another way is to have one CSS class for the lead-in paragraph that instructs Flare to avoid a page break after and another CSS class for the paragraph that holds the image that instructs Flare to avoid a page-break-before.
In my own practice, the lead-in to a figure is always the figure title, so my code is:
In the p.FigureTitle CSS, I also set up an auto-number for the figure title, but that's a whole other discussion.
HTH
To achieve the specific behavior you're after, you have a couple of options.
One way is to put the paragraph that holds the lead-in sentence and the paragraph that holds the image inside a div and assign the div class that includes the page-break-inside attribute set to "avoid". I use this exact div structure, with a class of div.Figure.
Code: Select all
div.Figure
{
page-break-inside: avoid;
}
Code: Select all
div.NoBreakInside
{
page-break-inside: avoid;
}
Code: Select all
p.FigureLeadin
{
page-break-after: avoid;
}
p.Figure
{
page-break-before: avoid;
}
Code: Select all
p.FigureTitle
{
page-break-after: avoid;
}
p.Figure
{
page-break-before: avoid;
}
HTH
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Keep with next...please
Thank you ! I created the new Div and it works great !!!
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Keep with next...please
I have p.KeepWithNext (which avoids break after) and p.Graphic (which avoids a break before).
One really consistent problem I can't get past is when I have these two paragraphs nested in the first <li> in a list, in which case they don't both jump onto the next page if there isn't enough space, the introductory paragraph stays on the first page and the graphic goes to the next. It's ONLY the first list item that misbehaves, any subsequent list items behave as expected. I've had this for years and it's annoying, and I don't know how to fix it, or even where to look to identify the cause. Any suggestions?
One really consistent problem I can't get past is when I have these two paragraphs nested in the first <li> in a list, in which case they don't both jump onto the next page if there isn't enough space, the introductory paragraph stays on the first page and the graphic goes to the next. It's ONLY the first list item that misbehaves, any subsequent list items behave as expected. I've had this for years and it's annoying, and I don't know how to fix it, or even where to look to identify the cause. Any suggestions?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx