CSS: box-sizing property

Nisha
Mar 30, 2021

box-sizing defines how the width and height that gets applied to an element.

  • content-box: The width & height of the element only include the content. In other words, the border, padding, and margin aren’t part of the width or height. This is the default value.
  • border-box: The padding and border are included in the width and height.

--

--