When calculating width in CSS, the border and padding is not included. If I make width: 100% and set content in the center with some borders and paddings, the content will not in the center and will be pushed a few to right and bottom. So I can set the following CSS to make width to contain border and padding.

box-sizing: border-box;

Label: none

Add new comment