This is the code I use to center images that have width's set as percentages:
<div class="imagecentre"><img alt="a horse" src="../Images/pic0001.png" /></div>
div.imagecentre
{
margin-left: 25%;
width: 50%;
}
div.imagecentre img
{
width: 100%;
}
Quote:
When setting a relative image width (such as 50%), create a left margin that is half of the remaining page width. In the example below the image width is 50% of the screen so the left margin is set to 25%.
|
I found the code at
http://adamdscott.com/wrote-about/re...ges-in-ibooks/ and have tested it on: Ibooks, Sony PRS-505, ADE and the firefox epubreader.
At first it seemd like a simple fix but it was hard finding a solution that worked reliably on so many readers.