How to fix the css flex layout up and down and keep 100% in the middle?

100% height is required in the middle, but I don"t know how to implement

Mar.01,2021

<style>
  .flex {
    display: flex;
    flex-direction: column;
    height: 100vh
  }
  .flex-item {
    flex: 1;
    overflow: auto;
  }
</style>
<div class="flex">
  <div>top</div>
  <div class="flex-item"></div>
  <div>bottom</div>
</div>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e54b49-452d9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e54b49-452d9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?