<ul>
  <li>1</li>
  <li>2</li>
</ul>
ul {
  display: flex;
  flex-wrap: wrap;
  outline: 1px solid #00f;
  margin: 10px auto;
  width: 200px;
}
li {
  box-sizing: border-box;
  flex-basis: 100px;
  outline: 1px solid #f00;
  padding: 20px;
  text-align: center;
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.