Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2019, 12:07 AM   #1
AliceWonder
Connoisseur
AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.
 
Posts: 97
Karma: 200000
Join Date: Aug 2019
Device: none
Centering svg node in xhtml

Cover page uses svg so that I can typeset text on the image and text is always sharp regardless of the device resolution.

In portrait works fine - the aspect ratio of devices are such that the image is always 100% of width. But in landscape the image is the way the left and nothing I've tried w/ CSS will center it.

Code:
<body>
<div class="coverpage">
<svg xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="1.1" width="100%" height="100%"
  viewBox="0 0 800 1120" preserveAspectRatio="xMinYMin">
  <!-- svg code -->
</svg>
</div>
</body>
Help?
AliceWonder is offline   Reply With Quote
Old 09-12-2019, 12:20 AM   #2
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 3,467
Karma: 32900329
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
"xMinYMin" means put the image in the upper left corner. Use "xMidYMid" to center it horizontally and vertically.
jhowell is offline   Reply With Quote
Advert
Old 09-13-2019, 12:46 AM   #3
AliceWonder
Connoisseur
AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.
 
Posts: 97
Karma: 200000
Join Date: Aug 2019
Device: none
THANK YOU !!!

Worked
AliceWonder is offline   Reply With Quote
Reply

Tags
css, svg

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion from xhtml to epub loose svg images pwessel Conversion 3 05-24-2015 11:29 PM
Guide for converting Kindle Topaz (xhtml with svg) to PDF Fschumaur Workshop 5 03-27-2015 01:35 AM
Centering SVG graphics in iBooks? FunkeXMix ePub 8 01-04-2013 09:21 PM
XHTML fallback for SVG Iznogood ePub 15 10-08-2012 07:52 PM
How can I convert topaz ebook from multiple xhtml's (SVG) to single pdf? rglk Workshop 3 11-28-2011 04:33 PM


All times are GMT -4. The time now is 11:01 PM.


MobileRead.com is a privately owned, operated and funded community.