|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Enthusiast
![]() 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 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%; } |
![]() |
![]() |
![]() |
#2 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jul 2013
Device: ipad
|
If you include
Code:
display: inline-block; |
![]() |
![]() |
![]() |
#4 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
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.
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#7 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
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.
|
![]() |
![]() |
![]() |
#8 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#9 | |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
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.) |
|
![]() |
![]() |
![]() |
#10 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
Tags |
img, split |
|
![]() |
||||
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 |