Created
April 12, 2017 18:28
-
-
Save moxdev/054137e96280bc607cc43824c84e2560 to your computer and use it in GitHub Desktop.
Center content with Flexbox
This file contains hidden or 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; | |
| } | |
| <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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment