Static position : the default static position is the element that appears in the normal stream of your HTML file, if no position is specified at all.
Important: top , right , bottom and left properties DO NOT HAVE AN EFFECT ON THE STATISTICS OF THE POSITIONED ITEM.
Positional relative: positioning an element with a relative value stores the element (and the space it occupies) in the normal stream of your HTML file.
Then you can move the element by a certain amount using the properties left , right , top and bottom . However, this can lead to the fact that the element overlaps other elements that are on the page, which may or may not be the effect that you want.
A relatively located element can move out of its spot, but the space it occupies remains.
Absolute position: Applying the absolute value of the position to the element removes it from the normal flow. When you move an element with an absolute position, its anchor point is the top / left part of its nearest containing element, which has a position declared different from static, also called its closest positioning context. So, if there is no element with a position other than static, then it will be located from the upper left corner of the body element.
In your case, the third nearest container contains the 2nd.
Gaurav Feb 11 '14 at 13:29 2014-02-11 13:29
source share