Skip to content

Instantly share code, notes, and snippets.

@jodaka
Created May 26, 2011 14:33
Show Gist options
  • Save jodaka/993270 to your computer and use it in GitHub Desktop.
Save jodaka/993270 to your computer and use it in GitHub Desktop.
HTML/CSS3 for vertical div centering in Webkit
<style>
#outer {
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
#inner {
display:-webkit-box;
-webkit-box-flex:1;
-webkit-box-align: center;
-webkit-box-pack: center;
-webkit-box-orient:vertical;
height:100%; width: 100%;
}
</style>
<div id="outer">
<div id="inner">
<div> here your info </div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment