JSFiddle - React, Tailwind, and code Playground
by Zacc206
HTML
<div id="wrapper">
<section>
<a href="#">
<div class="tile">
<div class="content">A</div>
</div>
</a>
<a href="#">
<div class="tile">
<div class="content">B</div>
</div>
</a>
<a href="#">
<div class="tile">
<div class="content">C</div>
</div>
</a>
<a href="#">
<div class="tile">
<div class="content">D</div>
</div>
</a>
</section>
</div>
CSS
a{
width: 150px;
height: 150px;
background: #0072c6;
margin: 10px;
border: 0;
text-decoration: none;
}
.tile{
position: relative;
float: left;
height: 150px;
width: 150px;
margin: 4px;
padding: 0;
vertical-align: bottom;
}
.content{
width: 150px;
height: 150px;
display: table-cell;
vertical-align: middle;
margin-left: 0px;
margin-right: auto;
text-align: center;
}
img{
max-height: 20px;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 20px;
}
a:focus{
display: inline-block;
}