Skip to content

Instantly share code, notes, and snippets.

Created November 25, 2013 22:59
Show Gist options
  • Save anonymous/7650465 to your computer and use it in GitHub Desktop.
Save anonymous/7650465 to your computer and use it in GitHub Desktop.
html,body{
height: 100%;
text-align: center;
}
.inliner {
height: 100%;
}
.inliner,
.inliner + * {
display: inline-block;
vertical-align: middle;
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<i class="inliner"></i><div>Sample text<br> in two lines,<br>3 lines <br> and so on</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment