JSFiddle - React, Tailwind, and code Playground
by Kirubel Girma
HTML
<div class="xdocument">
<div class="ppr">
<span class="ppr_type">.docx</span>
</div>
<div class="xdoc_ttl">Uploaded Document (1)</div>
</div>
CSS
body {
font-family: arial;
}
/* Document Icon CSS begins here*/
.xdocument {
max-width: 5.1em;
margin: 1em;
}
.ppr {
height: 5em;
width: 3.8em;
background: cornflowerblue;
border: 0.1em solid #0000001a;
border-radius: 0.5em;
position: relative;
margin: auto;
}
.ppr_type {
position: absolute;
right: 0;
bottom: .2em;
left: 0;
text-align: center;
color: white;
font-size: 0.8em;
}
.xdoc_ttl {
color: #a5a5a5;
text-align: center;
font-size: 0.8em;
margin-top: 0.9em;
}
/* Document Icon CSS ends here*/