Customising accordion

Hi,

How to set the number of rows or height in each accordion tab/panel?
By default they are all same height.

Eg. get rid of the empty space under ‘Home’ panel/tab:

Home

  • sub 1

Other

  • sub 1
  • sub 2
  • sub 3
  • sub 4