<!doctype html>
<style>
.container {
  width: 100px;
  height: 100px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid black;
  display: block;
}
.content {
  width: 100%;
  height: 100%;
  background: blue;
}
</style>
<div class="container">
  <div class="content"></div>
</div>
<div class="container" style="padding-top: 20px; padding-left: 20px">
  <div class="content"></div>
</div>
<div class="container" style="padding-right: 20px; padding-bottom: 20px">
  <div class="content"></div>
</div>
<div class="container">
  <div class="content"></div>
</div>
