Skip to main content

One doc tagged with "box-model"

View all tags

Box model — what "width" actually refers to

This chapter covers the CSS box model — the four regions of content, padding, border, and margin, and how box-sizing changes the interpretation of width. It walks through how far the background gets painted, when margin collapsing happens, and the idiom of applying border-box in a reset.