Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ottobyte/8575ed8b04e275da765b804ae1cd7450 to your computer and use it in GitHub Desktop.
Save ottobyte/8575ed8b04e275da765b804ae1cd7450 to your computer and use it in GitHub Desktop.
Flexbox variable height distribution test 4
<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>
.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