<div class="wrap">
<div class="flexbox">
  <div class="flexbox__item"><a href="">Grid1</a></div>
  <div class="flexbox__item"><a href="">Grid2</a></div>
  <div class="flexbox__item"><a href="">Grid3</a></div>
  <div class="flexbox__item"><a href="">Grid4</a></div>
  <div class="flexbox__item"><a href="">Grid5</a></div>
  <div class="flexbox__item"><a href="">Grid6</a></div>
  <div class="flexbox__item"><a href="">Grid7</a></div>
  <div class="flexbox__item"><a href="">Grid8</a></div>
  <div class="flexbox__item"><a href="">Grid9</a></div>
  <div class="flexbox__item"><a href="">Grid10</a></div>
</div>
</div>
.flexbox {
	display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.flexbox__item {
 padding: 8px 12px; 
}

.wrap {
 width: 500px;
 background: #eee;
 padding: 24px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.