CSS handles elements that contain each element in a single box.
The layout of the Web page, in fact, is the box placement and settings.
The frame border will make the box larger:
.box{
border: 10px 20px 30px 40px red solid;
}
.box{
border-width: 10px 20px 30px 40px;
border-color: red;
border-style: solid;
}
BORDER-TOP-XXX:
BORDER-RIGHT-XXX:
BORDER-BOTTOM-XXX:
BORDER-LEFT-XXX:
Border-style:
None Default No Border
Solid Straight frame
dotted; Dot-Shaped Box
Dashed; Dashed box
Double Two-wire frame
Groove The following effects depend on the Bordr-color
Ridge
Inset
outset;
Inhert; inherit.
The inner margin padding, will make the box bigger, will be affected by the Background-color
padding:100px 200px 300px 400px;
Equivalent
padding-top:100px;
padding-right:200px;
padding-bottom:300px;
padding-left:400px;
Margins margin, does not affect the size of the visible box, only affects the position of the box ... Left and top affect their position, right and bottom affect the position of other elements
margin:200px;
Equivalent
margin-top:200px;
margin-right:200px;
margin-bottom:200px;
margin-left:200px;
Attention:
Can be negative, that is, move in the opposite direction.
Margin-left:auto; Right in the parent element
Margin-right:auto; Left in parent element
__x__ (20) 0907 the fourth day __ CSS box model