Important: This article is only for Wix Editor sites. The way elements interact with each other in Wix Studio may differ. Learn more about Wix Studio page structure.
Element resizing in the Wix Editor occurs when elements change size automatically. For example, a text box might expand or a repeater might grow as more items appear.
These changes can shift other elements on the page and affect overall page height. Understanding how the Wix Editor positions elements and reacts to size changes helps you predict and control page behavior.
When elements change size, other elements on the page may shift to maintain spacing based on the gap rules defined below.
Elements may shift due to:
Elements don't shift due to:
The layout rules are particularly important when you're building:
Dynamic content features. For example:
Interactive elements. For example:
For example:
The Wix Editor organizes content as nested containers and elements. A parent contains its children, and elements with the same parent are siblings at the same level.
Parents set overall context and constraints, but a parent's effective bounds are often determined by its children. For example, a container can expand to fit new content.
Top‑level elements typically include the Header, the Page (which includes Sections), and the Footer, while their child elements can vary in many ways. The diagram below shows a possible arrangement of elements:

These layout rules consider only vertical position and size. The system ignores horizontal positioning when determining which elements affect each other.
The vertical gap between elements is the empty space between them, measured from the bottom of the higher element to the top of the lower element.
When deciding whether to trigger movement, the system always checks the element with the smallest gap from the resized element. This article refers to this element as the nearest sibling.
You need the exact size and position of each element. You can view these values in the Wix Editor Toolbar.
To calculate the gap:
For example, in the illustration below:
The blue element is positioned at 150 px and has a height of 50 px, so its bottom edge is at 200 px, calculated as 150 + 50. The orange element is at 250 px, so the gap is 50 px, calculated as 250 - 200.
The same process shows that the gap between the orange and green elements is 100 px.

When an element changes size, the system evaluates movement in this order:
Note: If multiple elements have the same smallest gap, the system treats them as equally nearest. In that case, all of those elements move at the same time according to the applicable rules.
For clarification, each of the following is treated as a single element when evaluated against its siblings:
Tip: To keep multiple items moving together, group them together or place them inside a container box, which you can also set to transparent.
Note: A group's bounds (top, bottom, left, and right) are derived from its children and determine gaps and overlap. The top equals the highest child's top position, and the same principle applies to the other bounds. To learn more, see Grouping and Ungrouping Elements.
The rules below outline how the system evaluates and applies layout adjustments.
When an element changes size, movement can cascade through the layout. The system repeatedly applies the evaluation order described in Rule evaluation sequence until no more elements move.
When an element collapses or expands, elements below may shift vertically. The behavior depends on the size of the gap between elements:
Elements below move:
Elements below stay in place, regardless of whether the element above has collapsed or expanded.

In the illustration above, the gap between the blue and orange elements is 50 px. Since this gap is less than 70 px, when the blue element collapses, the orange element moves up.
However, the gap between the orange and green elements is 100 px. Since this gap is greater than 70 px, the green element stays in place.

In this example, both gaps are 50 px. Consequently, when the blue element collapses, both the orange and green elements move up into the space previously occupied by the blue and orange elements, respectively.
The height of an element can increase when its content increases. For example, elements connected to a dataset may need to expand to display additional information.
When an element grows, the elements below may move down to accommodate the extra space. This behavior depends on the size of the gap between elements:
Elements below move down to preserve the original gap. Their new Y value increases by the gap size.
Elements below stay in place. The exception is when the resulting gap falls below 10 px, in which case the lower element moves down to maintain a 10 px gap.

In this example, the gap between the blue and orange elements is 50 px. Since this gap is 70 px or less, when the blue element grows by 30 px, the orange element moves down by 30 px to preserve the 50 px gap.

In this example, the gap between the blue and orange elements is 80 px. Since this gap is greater than 70 px:
Two elements are considered to vertically overlap when the lower element's top edge sits above the vertical middle of the higher element.
Note: An element's vertical middle is the average of its top and bottom edges. Wix Editor calculates it as Y + H/2, where Y is the top position and H is the height.
When elements overlap vertically, the normal rules don't fully apply.
For example, the behavior for 2 vertically overlapping elements during collapse and expand works as follows:
The illustration below demonstrates this behavior:

In both scenarios, the orange element's top edge is above the blue element's vertical middle. Therefore, overlap rules apply:
The illustration below demonstrates 2 scenarios where elements aren't considered overlapping:

In both scenarios, the orange element's top edge isn't above the blue element's vertical middle, so normal rules apply and elements move as expected.
The only difference is that in the lower scenario the blue and green elements overlap both horizontally and vertically after movement, while in the upper scenario they don't.