A small box rule becomes a layout box with content, padding, border, and painted background.

Program

The third diagnostic ladder follows box-model source through layout dimensions and into the final painted result.

layout_box_paint_result.html
Visuals: captured from real browser rendering
<style>
.box { width: 160px; padding: 16px; border: 4px solid #2563eb; background: #dbeafe; }
</style>
<section class="box">Receipt</section>
  1. Source delta: add box dimensions.

    The CSS source sets a 160 pixel content width.
    Source delta: width starts the box-model calculation.
  2. Browser structure: match the box element.

    The section element has class box and receives the rule.
    Browser structure: the section is the element being laid out.
  3. Diagnostic surface: read the box layers.

    The diagnostic surface separates content width, padding, and border.
    Diagnostic surface: the box model explains the element's layers.
  4. Rendered consequence: paint border and background.

    The rendered box has a pale blue background and blue border.
    Rendered consequence: paint uses the computed box layers.
  5. Learner check: calculate the outer width.

    The learner check adds width, padding, and border to get 200 pixels.
    Learner check: 160 plus 32 padding plus 8 border gives 200.
box model The box model separates content, padding, border, and margin.
painted result Painting uses the computed box to draw background and border pixels.