Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 05:10 AM   #1
Acopdegarrotix
Junior Member
Acopdegarrotix began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2013
Device: Kobo Glo HD, Kobo Sage
kepub epub3. Avoiding blank spaces caused by images

In order to avoid blank spaces when images are pushed to next page (kePub ePub3), I've tried to use code based on RbnJrg's suggestion, and it worked beautifully in Calibre's viewer.

Quote:
Originally Posted by RbnJrg View Post
Yes, is what I said in my previous post. Watch the images I included there, and how the text moves when the font size is changed to avoid blank spaces. With epub3 the fragmentation is completely avoided. Use something like this:

Code:
  <figure>
    <img src="../Images/Your_image.jpg" alt="" style="width:100%"/>

    <figcaption>Fig.1 - Blah, blah, blah</figcaption>
  </figure>
and

Code:
figure {
  float: left;
  margin: 1em 0;
  padding: 4px;
  -webkit-column-break-inside: avoid !important; /* for webkit ereaders */
  break-inside: avoid !important;  /* for the rest of ereaders */
}

figcaption {
  font-style: italic; /* if you wish */
  padding: 2px; /* set here the measure you wish */
  text-align: center; 
}
However, all my attempts to have it working on my Kobo Sage have failed utterly, so I'm wondering whether I'm making some sort of mistake or it is simply that Kobos don't honor this code.

Here's the code I'm using.

In the CSS:
Code:
figure {
  margin: 1em 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  display: inline-block !important;
  float: left !important;
  width: 100%;
  text-align: center;
  -webkit-column-break-inside: avoid !important;
  -webkit-page-break-inside: avoid !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

img {
  max-width: 80%;
  max-height: 80vh;
}
And in the xhtml:
Code:
  <figure>
    <img alt="" src="../Images/colour_01a.jpg"/>
  </figure>
Many thanks in advance to you all for your help.

Ernest
Acopdegarrotix is offline   Reply With Quote
Old Today, 08:57 AM   #2
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 792
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Have you tried margin: 0; instead of margin: 1em 0;?
icallaci is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't remove blank spaces between paragraphs Waylander Conversion 8 04-16-2024 11:38 AM
Missing spaces after coverting epub to kepub nyamok gajah Kobo Reader 11 01-11-2021 06:38 AM
kepub, EPUB3 and events fbrzvnrnd ePub 8 01-10-2017 02:43 AM
How to remove blank spaces? Mamaijee Conversion 2 04-09-2013 11:20 AM
Missing blank spaces in ToC richough3 ePub 3 09-10-2009 05:33 PM


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


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