Created
August 20, 2012 21:14
-
-
Save erotte/3407960 to your computer and use it in GitHub Desktop.
vertically centered with display: box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="de" class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<title>untitled</title> | |
<meta name="author" content="Eckhard Rotte"> | |
<style type="text/css" media="screen"> | |
html, body { | |
height: 100%; | |
} | |
.inner strong{ | |
display : block; | |
padding : 10px; | |
background : #adc; | |
} | |
.content{ | |
width : 100%; | |
height : 100%; | |
display : -moz-box; | |
display : -webkit-box; | |
display : box; | |
-moz-box-orient : horizontal; | |
-moz-box-pack : center; | |
-moz-box-align : center; | |
-webkit-box-orient : horizontal; | |
-webkit-box-pack : center; | |
-webkit-box-align : center; | |
box-orient : horizontal; | |
box-pack : center; | |
box-align : center; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="content"> | |
<div class="inner"><strong>vertically centered with display: box</strong></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment