.box {
background: lightgreen;
border: 50px solid green;
margin: 1em;
}
#box1 {
box-sizing: content-box; /*default*/
width: 300px;
height: 300px;
padding: 20px;
}
#box2 {
box-sizing: border-box;
width: 300px;
height: 300px;
padding: 20px;
}