Quote:
Originally Posted by Falkor
Actually for a couple of versions it has been creating loads of blank pages. And I've managed to split lines of text
Both issues might be caused by having margins (in %) at the top of a page –*are they no longer supported in Epub3? I had to use 100vh to get a full page image. With 100% height I'd get a line of text under the image.
|
I don't know how your Tolino Shine 5 renders the things, but try the following code to display a full page image (without no text line below):
1. In your .xhtml file:
Code:
<figure>
<div class="picture">
<svg xmlns="http://www.w3.org/2000/svg" height="100%" width="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 xxx yyy" xmlns:xlink="http://www.w3.org/1999/xlink"><image width="xxx" height="yyy" xlink:href="../Images/your_image.jpg"/>
</svg>
</div>
</figure>
2. In your .css stylesheet:
Code:
figure {
float: left;
display: flex;
width: 100%;
height: 100%;
line-height: 1.2em; /* Or the line-height you are using for <p> */
margin: 0;
text-align: center;
-webkit-column-break-inside: avoid !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
}
.picture {
float: left;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
line-height: 1.2em;
box-sizing: border-box;
margin: 0;
text-align: center;
-webkit-column-break-inside: avoid !important;
page-break-inside: avoid !important;
break-inside: avoid !important;
overflow: hidden !important;
}
.picture svg {
display: block;
margin: auto;
overflow: hidden !important;
height: 100vh !important;
}
Regarding margin-top, you can employ "%" but instead of that, in your Tolino I would employ "vh" (also is valid to employ "em" but if you increase the font-size, also will increase the margin-top and maybe you don't want that).
PS: Of course, this is epub3 code.