View Single Post
Old 09-20-2021, 07:26 AM   #12
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,801
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Karellen View Post

If it is possible to fix this in epub, I would appreciate the code to use. Thank you.
In my previous post I gave a link to another post of mine, where I describe the method to get what you want. I include again the link:

https://www.mobileread.com/forums/sh...21&postcount=9

Basically, it consist on include the image as a background of the html tag, as follow:

Code:
html {
   background: url("../Images/your_back_cover.jpg") no-repeat center center;
   background-size: cover; /* this is the key */
   height: 100vh; /* here you asure a full viewport */
   margin: 0;
   padding: 0;
}

body {
/* This declaration shouldn't be neccesary except by PocketBook */
   background-color: transparent; 
}
Two more things:

a) If your image has, for example, a relation of 4/3 and the ereader has a relation of 16/9, there is no way to avoid blank spaces at top and bottom. Even Kindle shows covers with blanks when the image doesn't have the same with/height relation than the screen reader.

b) Not all ereaders, support perfectly an image as background in the html tag. For example, for Android, Readily, Lithium and PocketBook support zero-bleed imagery. But for eink readers, I don't know of any with that capability.

In general, readers based on webkit (specially modern versions of webkit) will support images with zero-bleed. It's more doubtful for readers based on RMSDK (Legacy ADE).

Last edited by RbnJrg; 09-20-2021 at 07:31 AM.
RbnJrg is offline   Reply With Quote