collapse leaving huge gap between the elements and the footer.

Hi everyone.
I am trying to expend and collapse number of elements, using corvid.
The functions are working but the problem is the huge gap that appears between the elements and the footer. I know that this gap is the place for the elements after i expend them all, but the gap remaining when i open the page and after i collapse the elements.
I want to clear this gap and i need help with doing this.

// this part is working, but just in case.
export function openAni_click(event) {
$w( ‘#aniGroup’ ).expand();
$w( ‘#openAni’ ).hide();
}
export function closeAni_click(event) {
$w( ‘#aniGroup’ ).collapse();
$w( ‘#openAni’ ).show();
}

Thank you.