keeping a list item together with the image that follows it

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
jbananak
Propeller Head
Posts: 68
Joined: Thu May 03, 2012 2:45 am

keeping a list item together with the image that follows it

Post by jbananak »

Hi
For PDF output:
I can't seem to keep my bullet <li> with the following image <p><img>.....
I tried having the li style with a class with page-break-after set to "avoid" and a p style with a class set page-break-before to "avoid" .
There are more bullets in the list after the image (if that's relevant...).
To no avail.
Help! Thanks!
Joanna
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: keeping a list item together with the image that follows

Post by dorcutt »

Try setting up a div around both items with the page-break: inside attribute set to false. I have one that is set up this way named "KeepTogether" that I use all the time.

EDIT: Sorry, trying to move fast this morning. This might be a better solution, depending on what you're trying to do. Make sure that the content of your LI is a paragraph item ctrl-; is a handy shortcut), press enter to get a new p tag inside the same LI tag, and paste your image into there. Then, if you style either the LI tag itself or a new LI class (such as LI KeepTogether), the bullet content and image should stay together (and have the same indenting).

The reason why this is a better solution is that Div tags inside LI tags can cause problems with Word output currently. If you don't care about Word output, this clearly doesn't matter.
-Dan, Propellerhead-in-training
Michelle_Gardner
Propeller Head
Posts: 24
Joined: Mon Apr 14, 2014 10:22 am

Re: keeping a list item together with the image that follows

Post by Michelle_Gardner »

This might be a better solution, depending on what you're trying to do. Make sure that the content of your LI is a paragraph item ctrl-; is a handy shortcut), press enter to get a new p tag inside the same LI tag, and paste your image into there. Then, if you style either the LI tag itself or a new LI class (such as LI KeepTogether), the bullet content and image should stay together (and have the same indenting).
Thank you for this solution, @dorcutt. It works like a charm!
Post Reply