First page Back Continue Last page Graphics
Absolute, Relative, Fixed, Inherit, and Static Positioning
Absolute positioning defines the position of a given bounding box from the top and left side margins of the web page. This not only allows objects to be placed in an exact location, it also allows objects to be placed one on top of another.
Relative positioning defines the positioning in such a way that elements are offset from the previous element in the HTML code. This allows objects to be placed in relation to one another.
Fixed positioning defines the position of a given box relative to the window and remains in its specified location even as the content scrolls underneath it. This value does not work in Internet Explorer 6 or earlier. In IE 7, the browser must be in “standards-compliance mode”.
Inherit positioning explicitly sets the value to that of the parent (if the parent is position:absolute, the child will be position:absolute; if the parent is position:fixed, the child will be position:fixed).
Static positioning is the default. It defines the position of a given box essentially as an unpositioned element – it flows in the normal rendering sequence of the web page.