A Pen by Matic Leva on CodePen.
Created
December 17, 2018 09:06
-
-
Save DreadBoy/a7a561dd8deda4809220e2a55c35b01c to your computer and use it in GitHub Desktop.
Flex in columns
This file contains 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
<div class="images"> | |
<div class="image"><img src="https://images.unsplash.com/photo-1542321508-2160d24e6c7f"></div> | |
<div class="image"><img src="https://images.unsplash.com/photo-1537005081207-04f90e3ba640"></div> | |
<div class="image"><img src="https://images.unsplash.com/photo-1541202060524-fb245ae9b9ec"></div> | |
</div> |
This file contains 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
body | |
margin: 0 | |
.images | |
column-count: 2 | |
column-gap: 10px | |
.image | |
display: flex | |
align-items: center | |
justify-content: center | |
flex-direction: column | |
border: 2px solid red | |
.image:not(:last-child) | |
margin-bottom: 10px | |
.image img | |
display: block | |
width: 100% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment