JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
  <div id="item1">I'll be as tall as my content takes.</div>
  <div id="item2">From the rest, I'll take exactly 50%. No matter how short or long my content is. If needed there should be scrollbars.</div>
  <div id="item3">I'll take the other 50% of the rest!
  <br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?<br>right?
  </div>
</div>

CSS

body, html {
  margin: 0;
  overflow: hidden;
  height: 100%;
}

* { box-sizing: border-box; }

#container {
  width: 100%; height: 100%;
  border: 2px solid green;
  display: flex;
  flex-direction: column;
}

#item1 {background-color: Bisque ; }
#item2 { flex: 1; background-color: DarkOrange ; overflow-y: auto;}
#item3 { flex: 1; background-color: MediumAquaMarine ; overflow-y: auto;}