View Single Post
Old 11-02-2018, 06:08 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
FWIW, here is the code I use to center a block and then left-align the text. I usually use it for quotes, epigraphs, etc. I haven't had any issues with it, but I also haven't tested it on other devices/apps.

Code:
/* Centered & Left-aligned text */
div.quote       {margin:2em 0; 
                 float:left; 
                 position:relative; 
                 left:50%; 
                 clear:both}

div.quote p     {display:block; 
                 text-indent:0; 
                 font-size:.85em; 
                 text-align:left; 
                 position:relative; 
                 left:-50%; 
                 padding:0 2em; 
                 margin:0}

div.quote p.sig {margin:1em 0 0; text-align:right} /* For signature line */



<div class="quote">
<p>This is a paragraph of some sort. It can be of any length. The div will be centered on the page with the text left aligned within the div.</p>
<p>You can adjust the padding to give more/less space on either side.</p>
<p class="sig">From the <em>Memoirs of Dion</em></p>
</div>
Cheers,
Turtle91 is online now   Reply With Quote