Created
February 11, 2015 01:46
-
-
Save ezos86/537c8ac64991dfc4da81 to your computer and use it in GitHub Desktop.
Vertically Aligned Content - Annoying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="flexbox-container"> | |
<div class="blah">Vertically Aligned Content</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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