Yes, you can change the position of an object in Webflow to be relative to a specific element by using CSS positioning with a parent container set to relative
.
1. Set Parent Element to Relative
- Select the element you want to position the child relative to.
- In the Style panel, set Position to Relative.
- This step is essential: it defines the positioning context for any absolutely positioned child inside it.
2. Set Child Element to Absolute (or Fixed)
- Select the child element (the one you want to move).
- Set its Position to Absolute.
- It will now be positioned relative to the nearest parent with
relative
, absolute
, or fixed
positioning. - If no such parent exists, it will default to positioning relative to the body.
3. Adjust Position Offsets
- Once the child is set to Absolute, set the top, bottom, left, and right offsets according to your desired layout.
- These offsets will now refer to the boundaries of the relative parent, not the body.
Summary
To position an object relative to a specific element instead of the body in Webflow, set that parent element’s position to relative
, and the child to absolute
. This tells the browser to treat the parent as the positioning reference.