position: absolute;
1) Position absolute has offset properties too, exactly same like position relative and it doesn't depict any change without them.
In the DOM tree, whichever element has the position relative/absolute property, that element becomes the parent of the child element which has the position absolute property and the child refers the parent like shown in the picture below:
If no element has the position relative/absolute property with them, then the child element with the position absolute property refers the body tag as its' parent like in the picture below:


Comments
Post a Comment