Created
March 28, 2017 15:07
-
-
Save Farmatique/5d1492350e2e1742e6df1d4a920b954f to your computer and use it in GitHub Desktop.
all items flex-start, last item flex-end
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
| .container { | |
| display: flex; | |
| flex-direction: column; | |
| outline: 1px solid green; | |
| min-height: 400px; | |
| width: 100px; | |
| justify-content: flex-start; | |
| } | |
| p { | |
| height: 50px; | |
| background-color: blue; | |
| margin: 5px; | |
| } | |
| .end { | |
| margin-top: auto; | |
| /* it also works: margin-top: 0; */ | |
| } | |
| <div class="container"> | |
| <p></p> | |
| <p></p> | |
| <p></p> | |
| <p class="end"></p> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment