|
|
#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?! |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,615
Karma: 28549044
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
|
|
|
|
|
|
#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 11:47 AM |
| Image alignment and spacing | Derek R | Kindle Formats | 5 | 06-25-2011 01:57 PM |
| PRS-650 Text and alignment issues | henders254 | Sony Reader | 0 | 05-14-2011 09:11 PM |