Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sms-system/8871155 to your computer and use it in GitHub Desktop.
Save sms-system/8871155 to your computer and use it in GitHub Desktop.
Выравниваем дочерний div по центру (http://habrahabr.ru/post/73113/)
.parent {
width:500px;
height:400px;
background: #ffa;
}
.child {
display:-moz-inline-box;
display:inline-block;
vertical-align:middle;
zoom:1;
//display:inline
}
.parent:after {
content: '';
display:-moz-inline-box;
display:inline-block;
height:100%;
width:0;
vertical-align:middle;
zoom:1;
//display:inline
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment