View Single Post
Old 06-06-2023, 07:06 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,053
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by TheFrog View Post
Thank you David, I'm not too familiar with where this would go. Would I put that in the navigation folder, the style.css, etc? If so, does it matter what bracket of code it goes in?
This would be a html file so under text. The code is self contained so no CSS stylesheet is needed. Each text file would look similar to the one below. The changes needed would be to ensure the name of the graphics file (in this sample, image.jpeg) is changed to the name of the image file for the page and the width/height are changed in the places needed.

I've attached a simple ePub 3 file so you can take a look at the setup.

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" xml:lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <title>Image Testing</title>
  <style type="text/css" title="override_css">
            @page {padding: 0pt; margin:0pt}
            body { text-align: center; padding:0pt; margin: 0pt; }
        </style>
</head>

<body>
  <div>
    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 1000 1500" preserveAspectRatio="xMidYMid meet"><image width="1000" height="1500" xlink:href="../Images/image.jpeg"/></svg>
  </div>
</body>
</html>
Attached Files
File Type: epub Image_Tester.epub (12.79 MB, 143 views)
DNSB is offline   Reply With Quote