- From: gitspeaks via GitHub <noreply@w3.org>
- Date: Mon, 09 Mar 2026 14:11:48 +0000
- To: public-css-archive@w3.org
> When an element is positioned absolutely (`position: absolute`), its positioning coordinates (`top`, `right`, `bottom`, `left`) are calculated relative to the border box of its nearest positioned ancestor. This is not correct. From the CSS Positioned Layout spec: Containing Blocks of Positioned Boxes [https://www.w3.org/TR/css-position-3/#def-cb](https://www.w3.org/TR/css-position-3/#def-cb) > If the ancestor is not an inline box, the containing block is formed by the **padding edge** of the ancestor. And: Positioning Coordinates [https://www.w3.org/TR/css-position-3/#coords](https://www.w3.org/TR/css-position-3/#coords) > For absolute positioning, the inset properties represent insets from the containing block. Since the containing block is formed by the **padding edge**, offsets are calculated relative to the **padding box**, not the border box. So absolute positioning does not ignore the parent’s padding; `top: 0` / `left: 0` already align to the padding edge. -- GitHub Notification of comment by gitspeaks Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12929#issuecomment-4024074460 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 9 March 2026 14:11:49 UTC