<!DOCTYPE html>
<body>
<style>
.parent {
  width: 100px;
  height: 100px;
  background: blue;
}
  
.child {
  width: 30px;
  height: 30px;
  background: green;
}

</style>
<div class="parent">
  <div class="child">
  </div>
</div>
</body>
