Skip to content

Instantly share code, notes, and snippets.

@Hatteron
Created July 27, 2017 09:59
Show Gist options
  • Save Hatteron/576c2275a4586bf9887b67964e0b0c04 to your computer and use it in GitHub Desktop.
Save Hatteron/576c2275a4586bf9887b67964e0b0c04 to your computer and use it in GitHub Desktop.
// The HTML
<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>
// The CSS
.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