Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-20-2013, 07:19 PM   #1
whbenson
Enthusiast
whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.
 
Posts: 37
Karma: 493532
Join Date: May 2010
Device: ipad
keeping image and caption together

Expanding on a solution PageLab posted for a different iBooks problem in
http://www.mobileread.com/forums/sho...d.php?t=172771, I've been using code like the following to keep images with their captions together on the same page:

XHTML
Code:
<p><span class="sidebar"><img alt="" class="scale" src="../Images/image.jpg" />caption</span>paragraph</p>
CSS
Code:
.sidebar {
page-break-inside: avoid;
display: inline-block;
margin: 0 .5em 0 0;
float: left;
width: 50%;
text-align: center;
font-size: .8em;
font-style: italic;
}
img.scale {
max-width: 100%; /* images never scaled up */
width: 100%;
}
This works - i.e. will start a new page if necessary - but instead of always starting at the top, sometimes overcompensates by spacing down some distance. I assumed this was just a quirk in iBooks to live with, but recently noticed the same thing when printing to a PDF from Sigil. [Incidentally, OSX Preview gives nearly instantaneous feedback on layout issues like this]. In any case I wonder if this clue helps anyone explain why this is happening, or have ideas for a workaround.
-Bill
whbenson is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to be sure a full page image+ caption is not split between 2 pages? silviolorusso ePub 9 07-12-2013 09:24 PM
Keeping caption and illustration together John123 ePub 4 12-02-2012 10:19 AM
Caption, distance from image GraciousMe Sigil 10 10-30-2012 12:12 PM
L shape image with caption? LostSock ePub 5 09-08-2011 08:24 PM
Center Image and Caption SamL ePub 11 08-12-2011 10:27 AM


All times are GMT -4. The time now is 11:02 PM.


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