JSFiddle - React, Tailwind, and code Playground
HTML
<div class="my-app">
<div class="sidebar">
<p>
Sidebar fixed width of 300px;
</p>
</div>
<div class="map-container">
<div class="map">
<p>
Map should grow to fill available space horizontally and vertically
</p>
</div>
<div class="toolbar">
<table class="large-table">
<tr>
<td>Content should scroll and be 300px</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
<td>Content</td>
</tr>
</table>
</div>
</div>
</div>
CSS
html, body, .my-app {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
background: red;
}
.my-app {
display: flex;
flex-direction: row;
}
.sidebar {
background: orange;
/* width: 300px; */
flex: 0 0 300px; /* makes 300px width inflexible with flex-shrink: 0 */
overflow: auto;
}
.sidebar > p {
height: 1000px;
}
.map-container {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0; /* allows flex item to shrink past its content size */
}
.map {
background: aqua;
flex: 1;
}
.toolbar {
height: 300px;
background: lightgreen;
overflow: auto;
}