Last active
December 1, 2016 09:53
-
-
Save jrswgtr/d72957bf6d810d9e1e777770af241e3c to your computer and use it in GitHub Desktop.
flexbox centering
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="aligner"> | |
<div class="aligner-item Aligner-item--top">…</div> | |
<div class="aligner-item">…</div> | |
<div class="aligner-item Aligner-item--bottom">…</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
.aligner { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.aligner-item { | |
max-width: 50%; | |
} | |
.aligner-item--top { | |
align-self: flex-start; | |
} | |
.aligner-item--bottom { | |
align-self: flex-end; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment