Skip to content

Instantly share code, notes, and snippets.

@tomkp
Last active August 29, 2015 14:07
Show Gist options
  • Save tomkp/65846fff7549a87abf0e to your computer and use it in GitHub Desktop.
Save tomkp/65846fff7549a87abf0e to your computer and use it in GitHub Desktop.
flexbox everything
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
* {
position: relative;
}
html, body {
font-size: 16px;
line-height: 1.5rem;
height: 100%;
min-height: 100%;
background: #ddd;
}
.border-layout {
display: flex;
flex: 1;
position: relative;
}
.vertical {
flex-direction: column;
height: 100%;
min-height: 100%;
}
.horizontal {
flex-direction: row;
height: 100%;
position: absolute;
left: 0;
right: 0;
}
.vertical > .header {
background: #E74C3C;
height: 3rem;
width: 100%;
}
.horizontal > .header {
background: #27AE60;
width: 3rem;
height: 100%;
}
.vertical > .content {
background: #2980B9;
}
.horizontal > .content {
background: #95A5A6;
height: 100%;
}
.content {
flex: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment