![css - Difference between style = "position:absolute" and style = "position:relative" - Stack Overflow css - Difference between style = "position:absolute" and style = "position:relative" - Stack Overflow](https://i.stack.imgur.com/gz265.png)
css - Difference between style = "position:absolute" and style = "position:relative" - Stack Overflow
![Pratham on Twitter: "Now let me apply relative position to red(parent) div and absolute position to black(child) div. As I mentioned absolute position is relative to closest ancestor having some position property Pratham on Twitter: "Now let me apply relative position to red(parent) div and absolute position to black(child) div. As I mentioned absolute position is relative to closest ancestor having some position property](https://pbs.twimg.com/media/EtDgdA2XYAA4C7l.jpg)
Pratham on Twitter: "Now let me apply relative position to red(parent) div and absolute position to black(child) div. As I mentioned absolute position is relative to closest ancestor having some position property
![html - How do I make a absolute positioned div have a width equal to it's parent minus some margin - Stack Overflow html - How do I make a absolute positioned div have a width equal to it's parent minus some margin - Stack Overflow](https://i.stack.imgur.com/yATkl.gif)