Skip to content

Instantly share code, notes, and snippets.

@passcod
Created Oct 18, 2012
Embed
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 {
height
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>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment