View Single Post
Old 09-29-2019, 12:34 AM   #1
AndrewCanada
Junior Member
AndrewCanada began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2019
Device: Kindle Paperwhite
Image Alignment Issues

Good evening,

I am working on my eBook (AZW3 format) and it has a number of portrait images. I am trying to format them such that they have a height of 50% of the page, are scaled with the original aspect ratio, and are centred horizontally.

HTML:

Code:
<div class="calibre35"><img class="calibre35" src="../images/00033.jpeg"/></div>
CSS:

Code:
.calibre35 {
  height: 50%;
  text-align: center;
}
Unfortunately with this code, everything looking great in the ebook-edit program preview window but when I load the file onto my Kindle Paperwhite it's a mess. 1 image might be the correct size and centred, another might be ~80% height and centred, and others might be 50% height but 100% width (stretched horizontally). Yet all of these files are the same dimensions and use the same HTML and CSS classes.

What am I doing wrong?!
AndrewCanada is offline   Reply With Quote