CSS box-sizing property
CSS box-sizing property represents the box model of content. A box may include or exclude the border area as part of the box dimension.
box-sizing : content-box | border-box
The content-box counts the content area only i.e. border is not a part of the box's dimensions.
The height and width of the box include the content and padding areas only excluding the border area.
In this case, border-box includes the content area, padding area, and border area i.e. border is also a part of the box's dimensions.
The width and height of the border-box is the sum of content area, padding area and border area.
It applies to all elements
Was this article helpful?