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
keeping a list item together with the image that follows it
Re: keeping a list item together with the image that follows
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.
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
Thank you for this solution, @dorcutt. It works like a charm!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).