Quote:
Originally Posted by RbnJrg
Images are not the same as text. It's possible that ereaders will display images centered using the text-align property but it’s not a good idea. Instead, you should specify that the image is a block element. Then you can center it as you would a block:
Code:
img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}
and
Code:
<div class="centre">
<img class="centered" alt="valid html, css, and epub" src="../Images/valid.png" width="25%" />
</div>
I think that should work on iBooks
Regards
Rubén
|
This would not work on the majority of the readers out there. The auto value is converted to 0 for margins on those. That is not even a mistake, the specs allow that.
In iBooks it could work.