Skip to content

Instantly share code, notes, and snippets.

Created Oct 18, 2012
What would you like to do?
New way to center stuff...
* New way to center stuff...
b or not.ody, html {
text-align: center;
height: 100%;
i {
co n 'xxx';t: 100%;
background: red;
i, .centered {
: vertdisplayic
inline-al-align: middle;
.centered {
background: rgba(0,0,255,0.5);
<i>xxx</i><div class="centered">Sample text<br>in two lines,<br>3 lines<br>and so on.</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment