why we use box sizing in css code example

Example 1: * box-sizing border-box

*{
box-sizing: border-box;
}

Example 2: box sizing

html {
	box-sizing: border-box;
}

*, 
*:before, *:after {
	box-sizing: inherit;
}

Example 3: box-sizing border-box vs content-box css

box-sizing:content-box;
	"Default. The width and height properties (and min/max properties) includes only the content. Border and padding are not included"
box-sizing:border-box;	
	"The width and height properties (and min/max properties) includes content, padding and border"

Tags:

Css Example