Created
October 13, 2015 12:31
-
-
Save matheus-santos/a8a2d604daa7507d8341 to your computer and use it in GitHub Desktop.
Aligning items using 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
<style type="text/css"> | |
.wrap { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.item { | |
max-width: 50%; | |
} | |
.item--top { | |
align-self: flex-start; | |
} | |
.item--bottom { | |
align-self: flex-end; | |
} | |
</style> | |
<div class="wrap"> | |
<div class="item item--top">…</div> | |
<div class="item">…</div> | |
<div class="item item--bottom">…</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment