---
title: "Comment by Joe Attardi on \"Position: Absolute; Position: Relative;\" | Hashnode"
description: "The section on position: absolute is not quite accurate - the element is not necessarily positioned relative to its parent container. An absolutely positioned e"
url: "https://hashnode.com/posts/position-absolute-position-relative/61f0448787fd2728e7cd3dd0/comment/61f0b76687fd2728e7cd47be"
---

[Discussion](https://hashnode.com/posts/position-absolute-position-relative/61f0448787fd2728e7cd3dd0)

Comment [Position: Absolute; Position: Relative;](https://hashnode.com/posts/position-absolute-position-relative/61f0448787fd2728e7cd3dd0)

[Joe Attardi](https://hashnode.com/@joeattardi)

[Jan 26, 2022](https://hashnode.com/posts/position-absolute-position-relative/61f0448787fd2728e7cd3dd0/comment/61f0b76687fd2728e7cd47be)

The section on `position: absolute` is not quite accurate - the element is not necessarily positioned relative to its parent container.

An absolutely positioned element is positioned relative to the nearest _ancestor_ (not necessarily direct parent) that has a `position` other than `static`. Sometimes it can get a little tricky.

To make an absolutely positioned element relative to its containing element, you can just set `position: relative` on the parent.

[Victor Yakubu](https://hashnode.com/@theAviatorCodes2)

[Jan 26, 2022](https://hashnode.com/posts/position-absolute-position-relative/61f0448787fd2728e7cd3dd0/comment/61f0b76687fd2728e7cd47be#reply-61f1035487fd2728e7cd50de)

Thank you very much for the feedback back and correction. I really appreciate it. I will edit it.
