View Single Post
Old 08-20-2016, 10:23 AM   #2
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by JohnnyParker View Post
IDo I have to make a separate EPUB file with the image dimensions to suit each type of reader?
No, just use screen-relative (%) sizes instead of absolute or pixel sizes for height, width, max-width, etc. on the <img> styles. If you want to have finer control over aspect ratio (fit, stretch, clip etc.) then use <svg> instead of <img>

e.g. this image will display 100% of the available screen height with aspect ratio preserved:

Code:
<head>
  <title>Cover</title>
  <style type="text/css">
    @page { margin:0px; }
  </style>
</head>
<body style="margin:0px;">
  <div style="margin:0px; text-align:center;">
    <img style="height:100%; width:auto;" src="my-picture.png" />
  </div>
</body>
GeoffR is offline   Reply With Quote