Last updated
Last updated
By default, padding ADDS to the declared dimensions(see below)
Can have negative margin, but not negative padding
Margin is collapsable. So if divs stacked and top has margin-bottom: 40px and bottom one has margin-top 30px. Space between them will be 40px
Margin-auto horizontal centers div if it has set width
See own section
Margin and Padding can be negative :0
(Padding and Border within or outside declared width/height?
content-box => outside
border-box => Within