01-14-2013, 12:00 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2012
Device: IPad, Kindl, Nook, Sony Reader, Ibis, ADE
|
Page-Break-Inside: Avoid - Solution or Hack?
Dear All,
I am currently working on a book for a client with a lot of images and tables for .mobi. It is really important to them to keep the paragraph headings and images/text together. I have tried to group heading and image/text in a <div> and apply page-break-inside: avoid in the css. I have also tried to apply page-break-after: avoid; to the headings (<h3>). None is working and I assume both CSS elements are not working yet. Is there any other hack to circumvent this issue and force paragraphs to not break apart from putting the whole paragraph in an image. I would be super happy for any ideas. Best, Sabine |
01-14-2013, 12:05 PM | #2 |
frumious Bandersnatch
Posts: 7,526
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The old mobi format does not support any kind of CSS, although some CSS properties can be translated by the converter into something that achieves a similar effect (some pseudo-HTML code). But I don't think there's any equivalent for page-break-after: avoid (or -before, or -inside).
With KF8 it might be different, though. |
01-14-2013, 12:10 PM | #3 |
The Grand Mouse 高貴的老鼠
Posts: 72,032
Karma: 307903668
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Jellby has it exactly right. The old mobi format had no method of specifying "all this must fit or go to a new page".
|
01-17-2013, 04:10 PM | #4 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Not per se, but that doesn't mean it isn't possible to approximate it. The MOBI format does support forcing a page break at a particular spot, so what I would do is this:
Code:
<div class="nobreak"> content here </div> @media amzn-mobi { /* MOBI7 styles */ .nobreak { page-break-before: always; } } @media not amzn-mobi { /* KF8 styles */ .nobreak { page-break-inside: avoid; } } |
Tags |
css, formatting, kf8/mobi, page-break;css |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
page-break...:avoid / captions | Oxford-eBooks | Kindle Formats | 6 | 10-05-2012 06:15 AM |
iPad "page-break-after: avoid" not supports in Ipad. | Sushil | Apple Devices | 0 | 01-12-2012 05:14 AM |
Page-break-inside:avoid and mobi | AlexBell | Kindle Formats | 3 | 06-01-2011 06:03 AM |
How to avoid page break after heading/chapter | tkirke | ePub | 6 | 01-22-2010 02:12 PM |