CSS 3 · Selectors and the box model

Include padding in element widths

Make width mean the full box. A common global reset.

*, *::before, *::after {
  box-sizing: border-box;
}

Official CSS 3 documentation

More selectors and the box model commands

All selectors and the box model commands · CSS 3 cheatsheet

Was this page helpful?