Instantly share code, notes, and snippets.

Embed
What would you like to do?
Webkit 100% box

Webkit centered 100% box

<!doctype html>
<html>
<head>
<title>Test</title>
<style type="text/css" media="screen">
body,html{
margin: 0;
padding: 0;
height:100%;
width:100%;
}
#box{
width: 100%;
height: 100%;
background: green;
display:-webkit-box;
-webkit-box-orient:horizontal;
-webkit-box-pack:center;
-webkit-box-align:center;
}
</style>
</head>
<body>
<div id="box">
<p>The box</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment