Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2013, 12:00 PM   #1
sab1234
Junior Member
sab1234 began at the beginning.
 
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
sab1234 is offline   Reply With Quote
Old 01-14-2013, 12:05 PM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
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.
Jellby is offline   Reply With Quote
Advert
Old 01-14-2013, 12:10 PM   #3
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,504
Karma: 306214458
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".
pdurrant is offline   Reply With Quote
Old 01-17-2013, 04:10 PM   #4
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
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;
    }
}
dgatwood is offline   Reply With Quote
Reply

Tags
css, formatting, kf8/mobi, page-break;css


Forum Jump

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


All times are GMT -4. The time now is 11:33 AM.


MobileRead.com is a privately owned, operated and funded community.