In brief
width sets a width, but the measured area depends on box-sizing. With content-box, the value describes content; padding and borders add to the outer size.
Useful to know
width sets a width, but the measured area depends on box-sizing. With content-box, the value describes content; padding and borders add to the outer size. [1]
If width: 100% causes horizontal overflow, check those additions. Rather than compensating with an arbitrary smaller percentage, first establish which box is being measured.
Sources
For further detail and to check the information: