View Single Post
Old 12-19-2013, 03:46 PM   #40
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by Liliann View Post
I've attached an image that has these properties:
width: 553px;
max-width: 100%;
height: auto;
I regularly replace cover pages in epubs, for precisely this sort of reason; too many cover images get distorted in certain contexts. Here's what I've come up with for "tall" images:

max-width: 100%;
height: 100%;

I also wrap the image in a DIV that has:

text-align: center;
padding: 0;
margin: 0;
background-color: (something fitting);

...where "something fitting" is either black or a color that blends well with the image's background. For your application, you probably won't need to worry about that. You'll probably want to set page-break-before: always; (and maybe -after as well), though. The end result should be that the image displays on its own page, at full reader height, with the width auto-adjusted to maintain the proper aspect ratio.

I'm away from my computer at the moment, so that's going from memory. If it doesn't work, let me know and I'll post my complete cover page template (all 18 lines) when I get back to it.
Rev. Bob is offline   Reply With Quote