property
box-sizing — CSS reference
Chooses the edge for definite sizing values. Initial content-box; not inherited. Border-box subtracts padding and border from the specified size, with content floored at zero. Margins are outside both calculations.
Formal Syntax & Structure
css syntaxcss
content-box | border-boxWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS box geometry lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#a,#b,#c{width:100px;padding:10px;border:5px solid} #a{box-sizing:content-box} #b{box-sizing:border-box} #c{box-sizing:border-box;width:10px}</style><body><div id="a">Content</div><div id="b">Border</div><div id="c"></div></body></html>