JSFiddle - React, Tailwind, and code Playground
by vpetrychuk
HTML
<div class="container">
<div class="item item-1">1</div>
<div class="item item-2">2</div>
</div>
CSS
html,
body,
.container {
height: 100%;
}
.container {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.item {
background: #eee;
margin: 1px;
}
.item-1 {
-webkit-box-flex: 1 0 auto;
-moz-box-flex: 1 0 auto;
-webkit-flex: 1 0 auto;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
}
.item-2 {
-webkit-box-flex: 1 0 100%;
-moz-box-flex: 1 0 100%;
-webkit-flex: 1 0 100%;
-ms-flex: 1 0 100%;
flex: 1 0 100%;
}