View Single Post
Old 07-03-2023, 04:30 AM   #44
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,856
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Turtle91 View Post
I use the following - I have it set as a template so Sigil uses it when I click on Tools/Add Cover

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Cover</title>
</head>

<body style="margin:0; padding:0; background-color:black">
  <h1 style="display:none" title="Cover"/>

  <div style="margin:0; padding:0">
    <svg 
		xmlns="http://www.w3.org/2000/svg" 
		height="99vh" width="99vw" 
		preserveAspectRatio="xMidYMid meet" version="1.1" 
		viewBox="0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT" 
		xmlns:xlink="http://www.w3.org/1999/xlink">
        <image width="SGC_IMAGE_WIDTH" height="SGC_IMAGE_HEIGHT" xlink:href="SGC_IMAGE_FILENAME"/>
    </svg>
  </div>
</body>
</html>
If kobo barfs on the vw/vh, first off - complain to kobo and tell them to get their act in gear , second, just change them back to 100% (or 98% if you are having overflow issues)

Let us know if that works on your device(s) as well!
But there's no reason to use vw/h when % works. Why use vw/h when it might not work and % will work?
JSWolf is offline   Reply With Quote