length of a gallery

When a element is collapsed, it is collapsed and doesn’t take up any room on your page.
https://support.wix.com/en/article/corvid-how-page-layout-is-affected-when-elements-change-size

https://www.wix.com/corvid/reference/$w.CollapsedMixin.html
A collapsed element, unlike a hidden element, does not take up any space on the page. When collapsed, elements positioned within 70 pixels below the collapsed element and each other move up to take the collapsed element’s place where possible. The elements that move up maintain their positions relative to one another.