property-value
Box sizing/border box — CSS reference
Includes padding and borders within declared width. With 100px width, 10px padding and 5px borders on both sides, the rendered border-box width is 100px.
Formal Syntax & Structure
css syntaxcss
box-sizing: border-box;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>box-sizing/border-box</title><style>body{margin:8px;background:white;color:black;font:16px/20px sans-serif}*{box-sizing:content-box}#a{width:100px;padding:10px;border:5px solid blue;box-sizing:border-box}</style><body><div id="a">Example text</div></body></html>