<div class="grid-container">
  <div>1</div>
  <div>2</div>
  <div>3</div>  
  <div>4</div>
  <div>5</div>
  <div>6</div>  
</div>
.grid-container {
  display: grid;
  justify-content: center;/*làm cho các Grid Item nằm ở giữa vùng chứa*/
  grid-template-columns: 50px 50px 50px; 
  gap: 10px;
  background-color: #2196F3;
  padding: 10px;
}

.grid-container > div {
  background-color: #d3eafd;
  text-align: center;
  padding: 20px 0;
  font-size: 30px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.