Created
May 3, 2017 11:03
-
-
Save ottobyte/8575ed8b04e275da765b804ae1cd7450 to your computer and use it in GitHub Desktop.
Flexbox variable height distribution test 4
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
<div class="flex-wrapper"> | |
<div class="flex-column"> | |
<header class="flex-item flex-header"><h1>Flex header</h1></header> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item flex-last">Flex</div> | |
<footer class="flex flex-footer"><h3>Flex footer</h3></footer> | |
</div> | |
<div class="flex-column"> | |
<header class="flex-item flex-header"><h1>Flex header</h1></header> | |
<div class="flex-item">Flex</div> | |
<div class="flex-item flex-last">Flex</div> | |
<footer class="flex flex-footer"><h3>Flex footer</h3></footer> | |
</div> | |
</div> |
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
.flex-wrapper { | |
display: flex; | |
width: calc(100% - 20px); | |
height: calc(100vh - 40px); | |
padding: 20px 10px; | |
text-align: center; | |
} | |
.flex-column { | |
margin: 0 10px; | |
flex: 1; | |
display: flex; | |
flex-flow: column wrap; | |
} | |
.flex-item { | |
padding: 10px; | |
outline: 1px dashed white; | |
background: mediumaquamarine; | |
} | |
.flex-header { | |
background: lightseagreen; | |
} | |
.flex-footer { | |
background: darkseagreen; | |
} | |
.flex-last { | |
flex: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment