Skip to content

Instantly share code, notes, and snippets.

@matheus-santos
Created October 13, 2015 12:31
Show Gist options
  • Save matheus-santos/a8a2d604daa7507d8341 to your computer and use it in GitHub Desktop.
Save matheus-santos/a8a2d604daa7507d8341 to your computer and use it in GitHub Desktop.
Aligning items using flexbox
<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