View Single Post
Old 06-05-2015, 11:45 PM   #13
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 Notjohn View Post
So what happens when the KDP conversion reverse-engineers the CSS for the Mobi 7 devices? I use Sigil to create an epub, which I upload to the KDP, and Sigil by default puts the cover image in an SVG wrapper, thus:

<div style="text-align: center; padding: 0pt; margin: 0pt;">
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 800 1169" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><image height="1169" width="800" xlink:href="../Images/bookcover.jpg" /></svg>
I'm not quite sure what you're asking. You wrap the SVG in something like:

Code:
<span class="kf8only">...</span>
where that class is defined using @media queries to be display: none for media type amzn-mobi7. So the SVG isn't present in the MOBI slice when Kindlegen emits it.

And you do the same thing in reverse for the fallback content, making it hidden for media type not amzn-mobi7.

On the Mobi7 slice, obviously you don't have SVG, so you can't guarantee that the caption will be on the same page as the image, but there's not much you can do about that.
dgatwood is offline   Reply With Quote