<ul class="example">
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
</ul>
* {
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
ul {
  padding: 0;
  margin: 0;
}
li {
  line-height: 50px;
  width: 50px;
  background: #eee;
  text-align: center;
  list-style-type: none;
}
li:not(:last-of-type) {
  margin-right: 20px;
}
li:nth-child(1) {
  background: #a0dde2;
}
li:nth-child(2) {
  background: #e2a0b4;
  line-height: 70px;
}
li:nth-child(3) {
  background: #eec496;
  line-height: 90px;
}
li:nth-child(4) {
  background: #a0e2c2;
}

.example {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.