<div class="all">
  <div class="box">0</div>
  <div class="box">1</div>
  <div class="box">2</div>
  <div class="box">3</div>
  <div class="box">4</div>
</div>
html,
body {
  padding: 0;
  margin: 0;
  height: 100%;
}
.all{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.box{
  height: 100px;
  width: 100px;
  background-color: #489b48; 
  border: 2px solid white;
  display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 50px;
    font-weight: bold; 
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.