<div>
  <div class="box01">箱</div>
  <div class="box02">箱</div>
</div>
div{
  width: 150px;
  text-align: center;
  font-size: 2em;
}
.box01{
  margin-bottom: 30px;
  background-color: lightblue;
}
.box02{
  display: inline;
  margin-top: 100px;/* インラインの上下のmarginは指定できません */
  background-color: pink;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.