09-29-2019, 12:34 AM | #1 |
Junior Member
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> Code:
.calibre35 { height: 50%; text-align: center; } What am I doing wrong?! |
09-29-2019, 06:52 AM | #2 |
creator of calibre
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your best bet is SVG, or alternately using viewport units, though I dont recall if the Kindle renderer supports them
|
10-06-2019, 11:47 AM | #3 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
.calibre35 {
height: 50%; text-align: center; } You can't have both of the above lines in the same class. Create another class for the text-align line. Examples: <div class="calibre36"><img class="calibre35" src="../images/00033.jpeg"/></div> .calibre35 { height: 50%; width: 50%; } .calibre36 { text-align: center; } |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hello/Image and text alignment | Derek R | Introduce Yourself | 3 | 06-26-2011 10:47 AM |
Image alignment and spacing | Derek R | Kindle Formats | 5 | 06-25-2011 12:57 PM |
PRS-650 Text and alignment issues | henders254 | Sony Reader | 0 | 05-14-2011 08:11 PM |