View Single Post
Old 04-22-2013, 07:57 AM   #1
rhino79
Member
rhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheeserhino79 can extract oil from cheese
 
Posts: 18
Karma: 1210
Join Date: Apr 2013
Device: Nexus 7
Help with centering DIV and IMG

I have a question regarding why my images/captions refuse to display as centered (horizontally) when I open them in Adobe Digital Editions or Aldiko, when they display correctly in Sigil. This is driving me crazy. I have read a lot on the issue of centering, and I can't figure out what's going on with ADE/Aldiko.

I'm using this method:

<div>
<p><img>caption</p>
</div>
(it doesn't work when the <img> is placed outside the <p> either)

body {text-align:center;padding:0;margin:0;}

div.centered {
width:75%;
margin-left:auto;
margin-right:auto;
text-align:center;
}

p.caption {
width:100%;
text-align:center;
padding-bottom:1em;
}

img.pic {
width:100%;
display:inline-block;
text-align:center;
}

I've set the width of the div to a percentage, margins as auto, text-align as center, yet the div (with its image and text) STILL aligns left in ADE/Aldiko.

Any ideas? Thanks.
rhino79 is offline   Reply With Quote