 /*
  One simple way of making a div fill its space,
  with allowances for the title (top) and the resize handle (bottom)
  */
  #paletteContainer {
    position: absolute;
    bottom: 14px;
    left: 0px;
    right: 0px;
    top: 14px;
  }
</style>

<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script
  src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
  integrity="sha256-VazP97ZCwtekAsvgPB