Skip to content

Instantly share code, notes, and snippets.

@ezos86
Created February 11, 2015 01:46
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 ezos86/537c8ac64991dfc4da81 to your computer and use it in GitHub Desktop.
Save ezos86/537c8ac64991dfc4da81 to your computer and use it in GitHub Desktop.
Vertically Aligned Content - Annoying
<div class="container">
<div class="flexbox-container">
<div class="blah">Vertically Aligned Content</div>
</div>
</div>
.container{
width:500px;
height:500px;
margin:0 auto;
}
.blah{
padding:20px;
}
.flexbox-container {
height:500px;
margin:0 auto;
text-align:center;
background-color:#ccc;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-align: center;
-webkit-align-items: center;
-webkit-box-align: center;
align-items: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment