1, margin set object box spacing
we commonly used margin to set the distance between 2 boxes, no matter up or down the distance we can use margin implementation interval.
actually available margin local diagram
2, using margin to achieve the middle of the layout, the basic word:
marign:0 Auto;
can achieve the middle of the object, but need a condition, that is, the object superior must Set the text-align:center content in the middle attribute style. Some browser body tags do not set the text-align:center content in the middle style, its lower level contains the object set margin:0 Auto to make its layout in the middle, but in order to compatible with the major browsers to recommend a text-align:center attribute style to body, where divcss5 provides a CSS initialization template for DIV CSS layout when no The initialization style attributes such as CSS text-align:center need to be repeated.
four, CSS margin common case - TOP
DIVCSS5 set 2 boxes. In order to reflect the margin effect, we set the CSS border border, certain CSS width and CSS height for its 2 boxes.
1, margin use CSS code
.divcss5-top,.Divcss5-bottom{width:300px; height:100px; border:1px solid #F00}