a CSS3 Box Model property that specifies whether or not an element's border and padding are included in its height and width
This CSS3 Box Model property specifies whether or not an element's border and padding should be included when determining its height and width.
The two possible values are content-box
and border-box
.
content-box
The element's border, padding, and margin are not included when determining its height and width. This is the default value and the behavior specified in CSS2.1.
- height = content height
- width = content width
border-box
The element's height and width include its border and padding.
- height = border + padding + content height
- width = border + padding + content width
Resources
- CSS Basic User Interface Module Level 3 3.1. box-sizing property
- MDN box-sizing
- Can I use CSS3 Box-sizing