Three basic Positioning Mechanisms in css and three css positioning mechanisms
Three basic Positioning Mechanisms in css
A. Normal Document Stream
B. Positioning: relative positioning
Absolute Positioning
Fixed Positioning
C. Floating
1. in a normal stream, the element positions are determined by the document sequence and element nature. Block-level elements are arranged from top to bottom in sequence. The vertical distance between frames is calculated by the vertical margin value of the boxes, horizontal layout of row elements in a row
2. Relative positioning is regarded as a part of a normal stream. The moving element still occupies the original position, and moving the element will overwrite other boxes.
3. Absolute positioning: relative to the most recent ancestor element that has been located, absolute positioning is separated from the normal stream
4. Fixed positioning is relative to browser window Positioning
5. The floating element can be moved left and right until its outer border edge hits the edge of a box containing its own or another floating box.
6. Floating elements are separated from normal document streams
7. In-row and In-row block elements are arranged around floating boxes, and block elements are overwritten.