JSFiddle - React, Tailwind, and code Playground

by Craig

HTML

<div class="container">
  <div class="top">
    <div class="left">
      Top-left content
    </div>
    <div class="right">
      <div class="rightInternal">
        This rainbow should scroll!<br/><br/>
        <div style="background-color:red;height:60px">Richard</div>
        <div style="background-color:orange;height:60px">of</div> 
        <div style="background-color:yellow;height:60px">York</div> 
        <div style="background-color:green;height:60px">gained</div> 
        <div style="background-color:blue;height:60px">battle</div> 
        <div style="background-color:indigo;height:60px">in</div> 
        <div style="background-color:violet;min-height:60px">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris in congue ipsum. Suspendisse maximus non magna sed blandit. Fusce mattis nisl elit, a sollicitudin justo porta ac. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec elementum nunc ac vehicula dictum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla ultricies ipsum dignissim quam venenatis, in vehicula eros ultrices. Maecenas ut malesuada nulla.</div>
      </div>
    </div>
  </div>
  <div class="bottom">
    Bottom pane content should not collapse or be pushed outside the bounds of 'container'.
  </div>
</div>

CSS

.container {
  width: 90%;
  height: 300px;
  background: rgba(255, 125, 125, 1);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.top {
  width: 100%;
  background: rgba(238,130,238, 1);
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.left {
  width: 30%;
  min-width: 30%;
  background: rgba(135,206,250, 1);
  padding: 10px;
  margin: 10px;
}

.right {
  background: rgba(152,251,152, 1);
  padding: 10px;
  margin: 10px;
  flex-grow: 1;
  overflow-y: auto;
}

.rightInternal {
  display: flex;
  flex-direction: column;
}

.bottom {
  background: rgba(255,255,153, 1);
  padding: 10px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}