Skip to content

Instantly share code, notes, and snippets.

Created September 22, 2017 22:35
Show Gist options
  • Select an option

  • Save anonymous/78f85c3336c1e6e221cea183b6cafcbf to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/78f85c3336c1e6e221cea183b6cafcbf to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/kiyebeqezu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
* {
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
height: 500px;
}
.container__half {
flex-direction: column;
flex: 1 0 0;
display: flex;
flex-direction: column;
}
.container__half--top {
background: #ff0000;
justify-content: flex-end;
}
.container__half--bottom {
background: #dd0000;
justify-content: flex-start;
}
.item {
flex: 0 0 auto;
background: orange;
//border-top: 1px solid white;
//border-bottom: 1px solid black;
}
</style>
</head>
<body>
<div class="container">
<div class="container__half container__half--top">
<div class="item">1</div>
</div>
<div class="container__half container__half--bottom">
<div class="item">1</div>
</div>
</div>
<script id="jsbin-source-css" type="text/css">* {
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
height: 500px;
}
.container__half {
flex-direction: column;
flex: 1 0 0;
display: flex;
flex-direction: column;
}
.container__half--top {
background: #ff0000;
justify-content: flex-end;
}
.container__half--bottom {
background: #dd0000;
justify-content: flex-start;
}
.item {
flex: 0 0 auto;
background: orange;
//border-top: 1px solid white;
//border-bottom: 1px solid black;
}</script>
</body>
</html>
* {
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
height: 500px;
}
.container__half {
flex-direction: column;
flex: 1 0 0;
display: flex;
flex-direction: column;
}
.container__half--top {
background: #ff0000;
justify-content: flex-end;
}
.container__half--bottom {
background: #dd0000;
justify-content: flex-start;
}
.item {
flex: 0 0 auto;
background: orange;
//border-top: 1px solid white;
//border-bottom: 1px solid black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment