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 11-30-2012, 05:39 AM   #1
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Epubs: keeping images and captions together

To keep images and captions together I have tried enclosing both in a div tag with a class keeptogether and stating in the stylesheet:

div.keeptogether {
display:inline-block;
}

This seems to work. The only problem is that the image and caption are always left-aligned, event when I put text-align: center;
Does anyone know a way to make the images centred while using: display:inline-block; ..?
verydeepwater is offline   Reply With Quote
Old 11-30-2012, 05:59 AM   #2
DSpider
Evangelist
DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.
 
DSpider's Avatar
 
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
Left aligned in what application? Because with ePub we're back in 1999 where the same webpage looked differently in every browser.

While it may be displayed to the left in ADE, it may look fine in Sigil or in iBooks (and vice-versa for each ePub reading software or e-reader firmware).
DSpider is offline   Reply With Quote
Old 11-30-2012, 06:29 AM   #3
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
If caption and image must stay together, then make them one image.

Of course once it is done, you can't go back and restyle that caption without redoing the image.

One thing to be cautious of: In my Sony if the image gets too tall, it will bleed over onto the next page over text when displayed on a reader or the Reader Library, but will not show in Sigil.
mrmikel is offline   Reply With Quote
Old 11-30-2012, 06:36 AM   #4
DSpider
Evangelist
DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.
 
DSpider's Avatar
 
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
Quote:
Originally Posted by mrmikel View Post
Of course once it is done, you can't go back and restyle that caption without redoing the image.
And it won't be search-able either.
DSpider is offline   Reply With Quote
Old 11-30-2012, 07:24 AM   #5
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
and "inline-block" is not in the ePub 2.1 spec, so it's only by chance if it works.
Jellby is offline   Reply With Quote
Old 11-30-2012, 07:25 AM   #6
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Left aligned

Quote:
Originally Posted by DSpider View Post
Left aligned in what application? Because with ePub we're back in 1999 where the same webpage looked differently in every browser.

While it may be displayed to the left in ADE, it may look fine in Sigil or in iBooks (and vice-versa for each ePub reading software or e-reader firmware).

The images and captions are left aligned in ADE and in Ibooks on my Ipad.
verydeepwater is offline   Reply With Quote
Old 11-30-2012, 08:21 AM   #7
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Why don't you use just "display: block; text-align: center;" for the container block? (or just remove the display, as a <div> is shown as block by default.

Ah... I guess it's because ADE does not obey "page-break-inside: avoid"...
Jellby is offline   Reply With Quote
Old 11-30-2012, 09:28 AM   #8
verydeepwater
Member
verydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterverydeepwater can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 86
Karma: 12586
Join Date: Nov 2012
Device: Ipad and Kindle Fire
Quote:
Originally Posted by Jellby View Post
Why don't you use just "display: block; text-align: center;" for the container block? (or just remove the display, as a <div> is shown as block by default.

Ah... I guess it's because ADE does not obey "page-break-inside: avoid"...
Actually, I have started using "page-break-inside: avoid" - due to this problem. I came across the "display:inline-block" method first, but as far as I can see, the result is that both the caption and image become left-aligned, even if you have specified text-align: center; for both.

So as you suggest, "page-break-inside: avoid"... is probably the way to go. I am still at the stage where I get thrown if things don't appear correctly in ADE.

Thanks for your help.
verydeepwater is offline   Reply With Quote
Old 11-30-2012, 12:48 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
There's frankly no method that's guaranteed to work on all devices/apps ... outside of including the caption as part of the image, of course. I wouldn't exert a lot of effort trying to control something that can be so casually broken. I'd address it with "page-break-inside: avoid"; then forget about it and hope that more systems start obeying the attribute in the future.

Last edited by DiapDealer; 11-30-2012 at 01:02 PM.
DiapDealer is offline   Reply With Quote
Old 12-01-2012, 08:18 AM   #10
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
E readers are causing an upsurge in religion.....

Endless prayer that a ebook it will work on all devices!
mrmikel is offline   Reply With Quote
Old 12-02-2012, 11:38 AM   #11
John123
Connoisseur
John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40
 
John123's Avatar
 
Posts: 82
Karma: 73150
Join Date: Feb 2011
Location: Scottish Highlands
Device: Samsung Note, Kindle, hudl2
Quote:
Originally Posted by DiapDealer View Post
There's frankly no method that's guaranteed to work on all devices/apps ... outside of including the caption as part of the image, of course. I wouldn't exert a lot of effort trying to control something that can be so casually broken. I'd address it with "page-break-inside: avoid"; then forget about it and hope that more systems start obeying the attribute in the future.
Can "page-break-inside: avoid" be expressed in html? I'm trying to get my head round html first before moving onto css.
John123 is offline   Reply With Quote
Old 12-02-2012, 03:54 PM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Html? No. But it can be expressed using inline styles. There's no real point in separating styling from html. They go pretty much hand-in-hand with ePub proficiency. You're not going to be able to do very much without some styles -- whether they're inline, internal or external. That, plus you're asking for answers to some very non-html related issues.

Last edited by DiapDealer; 12-02-2012 at 03:57 PM.
DiapDealer is offline   Reply With Quote
Old 12-02-2012, 04:24 PM   #13
John123
Connoisseur
John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40John123 is slicker than a case of WD-40
 
John123's Avatar
 
Posts: 82
Karma: 73150
Join Date: Feb 2011
Location: Scottish Highlands
Device: Samsung Note, Kindle, hudl2
Quote:
Originally Posted by DiapDealer View Post
Html? No. But it can be expressed using inline styles. There's no real point in separating styling from html. They go pretty much hand-in-hand with ePub proficiency. You're not going to be able to do very much without some styles -- whether they're inline, internal or external. That, plus you're asking for answers to some very non-html related issues.
Without trying to "tie" the caption and the illustration together, I decided to put the book on my iPhone as a trial and they didn't hold together in some cases. Moreover, some of the illustrations themselves split over two pages. It all just looks so unprofessional. A plus point was when I touched the screen for a few seconds the image opened fully in a new frame(?) and I was also able to pinch zoom.
John123 is offline   Reply With Quote
Old 12-02-2012, 04:33 PM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
A plus point was when I touched the screen for a few seconds the image opened fully in a new frame(?) and I was also able to pinch zoom.
That's just a feature of the reader.
DiapDealer is offline   Reply With Quote
Reply

Tags
captions, epub conversion, images

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping images from Re-sizing on Kindle Fire MJWare Kindle Formats 3 08-21-2012 10:32 AM
PRS-T1 Scaling Images in epubs mochaiso Sony Reader 4 06-08-2012 12:33 AM
Images and captions in epub Balaji Workshop 3 08-19-2011 08:00 AM
A bug with images in epubs? Cyclops ePub 2 09-13-2010 10:57 AM
captions and images together detede Apple Devices 11 06-14-2010 09:00 PM


All times are GMT -4. The time now is 07:18 AM.


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