'Stretch container in table cell to full height

I have a table with columns of different heights. Now I want to stretch the containers in the columns (in deeppink) to the full height of their parents.

Problem: positioning items absolute or using only flexbox instead of the table is not a solution. Is there a CSS only solution to stretch the containers to the full height of their parents?

td {
  background-color: deepskyblue;
  width: 30px;
}

.container {
  display: flex;
  flex-direction: column;
  background-color: deeppink;
  text-align: center;
  // code below not working
  align-items: stretch;
  justify-content: space-between;
  height: 100%;
}
<table>
  <td>
    <div class="container">
      <p>1</p>
      <p>2</p>
      <p>3</p>
      <p>4</p>
    </div>
  </td>
  <td>
    <div class="container">
      <p>1</p>
    </div>
  </td>
  <td>
    <div class="container">
      <p>1</p>
      <p>2</p>
    </div>
  </td>
</table>

Thank you for your help which is highly appreciated! <3



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source