<h2>.clear-fix 방법</h2>
<div class="wrap clear-fix">
  <div class="one float">box1</div>
  <div class="two float">box2</div>
</div>
.wrap{
  border: 3px solid #999;
  font-size: 30px;
  margin-bottom: 30px;
}

.clear-fix::after {
  content:'';
  display:block;
  clear:both;
}

.one{
  margin: 5px;
  background-color: lightpink;
}
.two{
  margin: 5px;
  background-color: lightblue;
}

.float{
  float: left;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.