Created
August 9, 2016 11:17
-
-
Save Lysindr/85ac74e839136de71855fb7f729966b7 to your computer and use it in GitHub Desktop.
Flex grid
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="grid"> | |
<div class="grid__row"> | |
<div class="grid__item"> | |
<div class="item"> | |
<p>Hello</p> | |
<a href="#">Click</a> | |
</div> | |
</div> | |
<div class="grid__item"> | |
<div class="item"> | |
<p>Hello</p> | |
<a href="#">Click</a> | |
</div> | |
</div> | |
</div> | |
<div class="grid__row"> | |
<div class="grid__item">1</div> | |
<div class="grid__item">2</div> | |
<div class="grid__item">3</div> | |
</div> | |
<div class="grid__row"> | |
<div class="grid__item">1</div> | |
<div class="grid__item">2</div> | |
<div class="grid__item">3</div> | |
<div class="grid__item">4</div> | |
</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 { | |
padding: 80px; | |
} | |
.grid { | |
border: solid 1px #e7e7e7; | |
} | |
.grid__row { | |
display: flex; | |
} | |
.grid__item { | |
flex: 1; | |
padding: 12px; | |
border: solid 1px #e7e7e7; | |
} | |
.item { | |
max-width: 200px; | |
display: flex; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment