Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kossoy
Created August 26, 2012 02:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kossoy/3473284 to your computer and use it in GitHub Desktop.
Save kossoy/3473284 to your computer and use it in GitHub Desktop.
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