Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robozavri/0580b8b41b1f2fe178f579659b7d2c13 to your computer and use it in GitHub Desktop.
Save robozavri/0580b8b41b1f2fe178f579659b7d2c13 to your computer and use it in GitHub Desktop.
#css #flexbox
https://stackoverflow.com/questions/33924655/position-last-flex-item-at-the-end-of-container
.container {
display: flex;
width: 100%;
border: 1px solid #000;
}
p {
height: 50px;
width: 50px;
background-color: blue;
margin: 5px;
}
p:last-of-type {
margin-left: auto;
}
<div class="container">
<p></p>
<p></p>
<p></p>
<p></p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment