View Single Post
Old 12-26-2014, 10:18 PM   #28
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by RbnJrg View Post
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!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>
  <div>
    <svg xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      version="1.1"
      height="100%"
      width="100%"
      preserveAspectRatio="xMidYMid meet"
      viewBox="0 0 2040 2640">
      <image width="2040" height="2640" xlink:href="../Images/frontcover.jpg" />
    </svg>
  </div>
</body>
</html>
I'm pretty sure that additional CSS was to work around a bug in some reader—I forget which one—where the body tag did not fill the viewport vertically otherwise. Unfortunately, I failed to add an appropriate snarky comment in my git log to indicate which reader's bug I was working around, so I can't be certain.


Quote:
Originally Posted by RbnJrg View Post
I added the parameter "meet" under "preserveAspectRatio" to ensure the image is centered both, vertical and horizontally. Read this post (also the thread is very interesting):
That shouldn't be needed; the default is meet.
dgatwood is offline   Reply With Quote