<!DOCTYPE html>
<html>
<head>
<title>CSS Box Sizing</title>
<style>
.box1 {
width: 300px;
height: 100px;
border: 2px solid blue;
padding: 40px;
box-sizing: content-box;
margin-bottom: 30px;
}
.box2 {
width: 300px;
height: 100px;
border: 2px solid blue;
padding: 40px;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="box1">This div element has width:300px; and height:100px;.</div>
<div class="box2">This div element has width:300px; and height;100px;.</div>
</body>
</html>