Thread: margin: 0 auto;
View Single Post
Old 07-26-2010, 03:42 PM   #20
troymc
Groupie
troymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enoughtroymc will become famous soon enough
 
Posts: 161
Karma: 608
Join Date: Aug 2008
Location: Plano, TX
Device: Sony PRS-505 + B&N Nook + Motion LE1700 + Motorola Xoom Wifi
Quote:
Originally Posted by EricDP View Post
Just wondering if anybody tried the above on different readers and if it worked properly?
Yes. Well - somewhat. Using what you posted I have found two ways which do what I want:

1) similar to what you showed:
Code:
    <div class="centerblock">
      <p>
          ... ... ...
      </p>
    </div>
Where div.centerblock is "text-align: center; display: block;" and div.centerblock p is "text-align: left; display: inline-block;"

2) left-justified text in a centered blockquote

Code:
  <div class="poetry">
    <blockquote class="verse">
      <p>The Patron of true Holineſſe,<br />
      Foule Errour doth defeate:</p>

      <p>Hypocriſie him to entrappe,<br />
      Doth to his home entreate.</p>
    </blockquote>
  </div>
Where div.poetry is "text-align: center; display: block;" and blockquote.verse is " text-align: left; display: inline-block;". With inline-block the blockquote is only as wide as the included text. I found this because I wanted to put a border around the text.

Both of these appear to work fine in ADE (Sony/Nook) & webkit (Sigil/Calibre) readers. But don't ask why since I thought inline-block was not part of the spec.


Troy
troymc is offline   Reply With Quote