concept

padding-box — CSS reference

The padding edge encloses content and internal spacing, but not the border. In this non-scrolling box, clientWidth includes padding and excludes borders. It is an integer measurement, not a universal exact fractional metric.

Formal Syntax & Structure

css syntaxcss
content area + padding

Working 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{box-sizing:content-box;width:100px;height:40px;padding:10px;border:5px solid #254c55;margin:20px;display:flow-root} #a span{display:block;width:100%;height:100%}</style><body><div id="a" class="sample"><span id="b">Content</span></div></body></html>
CSS Reference