View Single Post
Old 08-23-2013, 02:47 AM   #20
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,369
Karma: 20212733
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
Quote:
Originally Posted by Le_Sparte View Post
Well, everything went fine. I'm ok with my styling (no vertical-align for my title, but there's no way to do it, right?).

Vertical align for a title can also be accomplished with a little help from our friend....the table...or more accurately the display:table property. Unfortunately, some of the older devices may not display tables properly, but with this technique they SHOULD degrade gracefully (display at the top of the page).

The following will center vertically on your screen then you just text-align:center to get it in the middle:

CSS:
div.v-ctr {height:100%; width:100%; display:table; position:fixed}
div.v-ctr div{display:table-cell; vertical-align:middle}
p.ctr {text-align:center; text-indent:0}


HTML:
<div class="v-ctr">
<div>
<p class="ctr">Title of Your Book</p>
<p class="ctr">by</p>
<p class="ctr">Little Ol' Me</p>
</div>
</div>


Cheers!

Last edited by Turtle91; 08-23-2013 at 02:55 AM.
Turtle91 is offline   Reply With Quote