|
|
#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?
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 |
|
|
|
|
|
#2 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,195
Karma: 2508097
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
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. |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
Jellby has it exactly right. The old mobi format had no method of specifying "all this must fit or go to a new page".
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
#4 |
|
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 228
Karma: 556000
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 | Mobi | 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 | Mobi | 3 | 06-01-2011 06:03 AM |
| How to avoid page break after heading/chapter | tkirke | ePub | 6 | 01-22-2010 02:12 PM |