JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapp">
<<div class="container">
<ul class="list">
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
1
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
2
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
3
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
4
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
5
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
6
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/100/100">
<div class="list_name">
7
</div>
</a>
</li>
<li class="list__item list__item_select">
<a href="#" class="list__link">
<img src="http://lorempixel.com/140/140">
<div class="list_name">
8
</div>
</a>
</li>
</ul>
</div>
</div>
CSS
.wrapp{
width:100%;
height: 100%;
margin: 0;
padding: 0;
}
.container {
width:400px;
margin: 0 auto;
box-sizing: border-box;
padding: 0;
opacity: 0.5;
background: blue;
}
.list {
width:300px;
box-sizing:border-box;
list-style: none;
padding: auto;
margin:0 auto;
background: red;
opacity: 0.6
}
.list:after {
content:'';
display: block;
clear:both;
}
.list__item {
border: 1px solid black;
width: 120px;
height: 120px;
margin: 10px 10px;
float:left;
box-sizing: border-box;
overflow:hidden;
text-align:center;
background: grey;
opacity: 0.3;
}