css.land/box-model

Everything displayed by CSS is a box. Understanding how the CSS Box Model works is therefore a core foundation of CSS. Whether that's a box that uses border-radius to look like a circle, or even just some text: the key thing to remember is that it's all boxes. It’s boxes all the way down!
[width_value + if (box_sizing_value = 'content-box', padding_value * 2 + border_value * 2)] calc([width_value][width_unit ][ if (box_sizing_value = 'content-box', ' + ' & (padding_value * 2 + border_value * 2) & 'px') ][ if(margin_active, ' - 2 * ' & margin & 'px') ]) Container width [if(margin_active, '- 2 * ' & margin & 'px')]
500 300px 10px 10px 10px 5px dashed red