I'm working on the layout below:
body {
display: flex;
flex-direction: column;
height: 100vh;
margin: 0;
}
.tier-1 {
flex: 0 0 40px;
}
.tier-2 {
flex: 0 0 50px;
background-color: steelblue;
}
.stuff {
flex: 1 0 100px;
background-color: navy;
padding: 20px;
overflow: auto;
}
.block-row {
display: flex;
margin-bottom: 10px;
justify-content: center;
}
.block {
flex: 0 0 470px;
background-color: white;
height: 300px;
border-radius: 5px;
margin: 20px;
border: 2px solid grey;
}
.block.wide {
flex: 0 0 950px;
height: 150px;
justify-content: flex-start;
}
<div class="tier-1"></div>
<div class="tier-2"></div>
<div class="stuff">
<div class="block-row">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
</div>
<div class="block-row">
<div class="block wide"></div>
</div>
</div>
Also can be edited at this Codepen: http://codepen.io/brad_julian/pen/BpzmYy/
The problem is that if the viewport is too skinny, the boxes in the first row are getting cut off. What I want is for the ".stuff" space to have a horizontal scrollbar when the window is too small.
Any idea why that isn't working?
EDIT: The problem I'm having is identical to this question (except horizontal, not vertical)