Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-10-2013, 09:37 AM   #1
silviolorusso
Enthusiast
silviolorusso began at the beginning.
 
silviolorusso's Avatar
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: none
How to be sure a full page image+ caption is not split between 2 pages?

I tried
Code:
page-break-inside: avoid
, but no luck?

This is the css I currently use:

Code:
div.container {
	page-break-before:always;
	page-break-after:always;
        page-break-inside: avoid;
}
div img {
	height: 80%;
}
silviolorusso is offline   Reply With Quote
Old 06-10-2013, 10:21 AM   #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
Quote:
Originally Posted by silviolorusso View Post
I tried
Code:
page-break-inside: avoid
, but no luck?
Well, that's the way (at least as long as image and caption fit the screen). If a particular ebook reader does not obey that, it's not your fault.

The only way to be (almost) sure no break will happen is including the caption into the image, but I'd never recommend that.
Jellby is offline   Reply With Quote
Old 07-02-2013, 01:53 PM   #3
shoban1071
Junior Member
shoban1071 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2013
Device: ipad
If you include

Code:
display: inline-block;
in your container div that should nudge the reader to keep the image and caption together. beyond that make sure your image is small enough that it isn't pushing the caption onto the next page anyway.
shoban1071 is offline   Reply With Quote
Old 07-02-2013, 02:28 PM   #4
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
But inline-block is not required by the ePub spec, so it's not the reader's fault if it doesn't work.
Jellby is offline   Reply With Quote
Old 07-02-2013, 04:04 PM   #5
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
setting page-break-after to avoid will often keep an image with its caption or putting them in the same block and using page-break-inside will work. So long of course it fits.

Dale
DaleDe is offline   Reply With Quote
Old 07-02-2013, 04:49 PM   #6
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
My standard solution of second-to-last resort: SVG. Include the image and the caption (as text) inside the SVG.
SBT is offline   Reply With Quote
Old 07-04-2013, 05:06 PM   #7
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
If I think the image is going to fill the screen on at least some e-readers (for example, on the e-ink kindle as opposed to the tablets) then I generally work the caption into the preceding paragraph.
Notjohn is offline   Reply With Quote
Old 07-05-2013, 03:34 AM   #8
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
Quote:
Originally Posted by Notjohn View Post
If I think the image is going to fill the screen on at least some e-readers (for example, on the e-ink kindle as opposed to the tablets) then I generally work the caption into the preceding paragraph.
Since the Kindles do not read the ePub format directly, is that behaviour due to something in the ePub format or to some bug/feature of whatever converter is used to read it in the Kindles?

I don't want to be an anti-Kindle advocate (we already have our resident one), but I don't want to see ePub discussions hijacked by anti-ePub readers (Kindle and, to some extent, iBooks), either.
Jellby is offline   Reply With Quote
Old 07-07-2013, 12:32 PM   #9
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by Jellby View Post
Since the Kindles do not read the ePub format directly, is that behaviour due to something in the ePub format or to some bug/feature of whatever converter is used to read it in the Kindles?
Oh no, it's simply the dimensions of the Kindle screen. A "normal" vertical photograph is 8x10 inches, the size of a traditional sheet of printing paper. On the Fire, such an image has room for a caption below it, because the Fire is comparatively skinny. The older e-ink Kindles (and I think the newer ones as well) by contrast are fatter. 800x1000 pixels would just about fill the entire screen, pushing the caption to the next page.

This can work havoc in books with multiple images. I once read a library e-book in which for five or six consecutive pages there was a caption at the top of the page and a photograph below, and in each case the caption referred to the photo on the previous page. (Obviously my dodge of working the caption information into the preceding paragraph wouldn't have headed off that calamity, but it does in the books I publish, which typically have one image per chapter.)
Notjohn is offline   Reply With Quote
Old 07-12-2013, 08:24 PM   #10
DomesticExtremis
Addict
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
This doesn't solve the original problem, but you could put the image and caption inside a <div> tag and then style the background to be some shade of grey, so that there is at least a visual clue as to which caption belongs to which image.
DomesticExtremis is offline   Reply With Quote
Reply

Tags
img, split


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Caption, distance from image GraciousMe Sigil 10 10-30-2012 11:12 AM
L shape image with caption? LostSock ePub 5 09-08-2011 07:24 PM
Center Image and Caption SamL ePub 11 08-12-2011 09:27 AM
iPad I found the uwnated blank pages before and after for each full-page image on iPad. Vengadesan Apple Devices 1 07-07-2011 01:23 AM
Full page Image Nakaleen ePub 1 01-20-2011 01:44 PM


All times are GMT -4. The time now is 06:03 PM.


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