Transfer from http://www.cnblogs.com/Jerry-Chou/archive/2011/11/02/2233094.html
1. First explain the flow of the document
is a mechanism of HTML, block elements of a single row (such as Div), inline elements do not wrap (a tag, img tag);
2. Several positioning methods
2.1 Static
HTML default positioning method, subject to document flow (flow), adaptive, do not need us to set.
2.2 Relative
Relative positioning, relative to their original position (reference is their own), you can use bottom,top,left,right and other positioning, but subject to the flow of documents, still occupy their original position;
2.3 Absolute
Absolute positioning, the reference is the ancestor has had the position:relative or the Position:absolute element, may use the bottom,top,left,right and so on localization, but the absolute localization will remove from the document flow, is the original occupied position will be canceled;
2.4 Fixed
Absolute references are the last-positioned ancestors (static not counted), if the reference to the element is a document, it is implemented using Position:fixed;
2.5 float
---restore content ends---
CSS Positioning Relative,absolute