JSFiddle - React, Tailwind, and code Playground
by Vishnuprasad ps
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="box-panel">
<div class="box-row">
<div class="box-col">
<div class="box-item item-1">
<h2><span>3</span></h2>
<p>لفشل واحدة كل على, بل إعا</p>
<figure><i class="fa fa-certificate" aria-hidden="true"></i></figure>
</div>
</div>
<div class="box-col">
<div class="box-item item-2">
<h2><span>3</span></h2>
<p>لفشل واحدة كل على, بل إعا</p>
<figure><i class="fa fa-id-card-o" aria-hidden="true"></i></figure>
</div>
</div>
<div class="box-col">
<div class="box-item item-3">
<h2><span>13</span></h2>
<p>لفشل واحدة كل على, بل إعا</p>
<figure><i class="fa fa-file" aria-hidden="true"></i></figure>
</div>
</div>
<div class="box-col">
<div class="box-item item-4">
<h2><span>3</span></h2>
<p>لفشل واحدة كل على, بل إعالفشل واحدة كل على, بل إعا</p>
<figure><i class="fa fa-desktop" aria-hidden="true"></i></figure>
</div>
</div>
</div>
</div>
CSS
.box-panel {
float: right;
width: 100%;
overflow-x: hidden;
}
.box-panel .box-row {
margin-right: -10px;
margin-left: -10px;
}
.box-panel .box-col {
float: right;
width: 25%;
padding-right: 10px;
padding-left: 10px;
box-sizing: border-box;
}
.box-panel .box-item {
width: 100%;
color: #fff;
text-align: right;
padding: 10px;
box-sizing: border-box;
border-radius: 4px;
border: 2px solid rgba(0, 0, 0, 0.05);
}
.box-panel .box-item h2 {
margin: 0;
font-weight: bold;
}
.box-panel .box-item h2 span {
display: inline-block;
margin: 0;
background: #fff;
width: 40px;
height: 40px;
border-radius: 100%;
color: #333;
text-align: center;
padding: 7px 0;
box-sizing: border-box;
font-size: 22px;
}
.box-panel .box-item p {
margin: 15px 0;
min-height: 40px;
}
.box-panel .box-item figure {
margin: 0;
}
.box-panel .box-item figure i {
font-size: 26px;
color: rgba(0, 0, 0, 0.3);
}
.box-panel .box-item.item-1 {
background: #c22918;
}
.box-panel .box-item.item-2 {
background: #d8810d;
}
.box-panel .box-item.item-3 {
background: #0c8817;
}
.box-panel .box-item.item-4 {
background: #2a63c1;
}
@media (max-width: 768px) {
.box-panel .box-col {
width: 50%;
margin-bottom: 20px;
}
}
@media (max-width: 640px) {
.box-panel .box-col {
width: 100%;
margin-bottom: 10px;
}
.box-panel .box-item p {
min-height: auto;
}
}