View Single Post
Old 04-26-2017, 04:45 PM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I'm not sure exactly what the problem is...I have been able to get my svg images to work in a couple different ways.

The first is to wrap the image in a <div> so that I can style it:
Spoiler:
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
div.img {display:block; margin:0 auto; text-align:center; width:100%}
img {width:100%}
</style>
</head>
<body>
<div class="img">
<img alt="svg3" src="../Images/svg3.svg"/>
</div>

<div class="img">
<img alt="svg4" src="../Images/svg4.svg"/>
</div>

<div class="img">
<img alt="svgimg0001" src="../Images/svgimg0001.svg"/>
</div>

<div class="img">
<img alt="svgimg0002" src="../Images/svgimg0002.svg"/>
</div>
</body>
</html>


The second is to wrap the image in an svg wrapper:

Spoiler:
Code:
<body>
  <div style="margin:0; padding:0; text-align:center">
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 288 24" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="24" width="288" xlink:href="../Images/svg3.svg"/>
    </svg>
  </div>
</body>


I saved this as an ePub and was able to have the images display using either method.
Turtle91 is offline   Reply With Quote