CSS
02:55
height: sets height of content (unit value, %)
Fills containing block by default
Can also set min-width, max-width, etc.
Applies to blocks, images and floats
Padding
padding: sets space around content (unit value, %)
padding-top, padding-bottom, etc.
Shares background colour with content
Margins
margin: sets space around border (unit value, %)
Can specify sides
Does NOT share background with content
Be careful of margin collapse
Two stacked block elements, margins may merge
Border
border-style: none, dotted, dashed etc.
Can also specify border-left-style, etc.
border-color: name, RGB or hex
Can specify side, border-top-color, etc.
border-width: unit value, %, or named (thin, medium, thick)
Can set to specific side
border-collapse: sets border to single line (collapse, separate)
Display
Renders element differently (specifies rendering category
display: block, inline, inline-block, table-cell, etc.
Doesn’t actually make the element something else, just displays it