JSFiddle - React, Tailwind, and code Playground
by vaheed akhtar
HTML
<div class="container">
<div class="content">
<div class="centerhoriz">
<!-- circle -->
<div class="square">
<div class="content">
<div id="smallcircle"></div>
</div>
<!-- content -->
</div>
<!-- square -->
</div>
<!-- center-horiz -->
</div>
<!-- content -->
</div>
<!-- container -->
CSS
.container {
display: table;
height: 500px;
width: 300px;
text-align: center;
background: lightblue;
}
.centerhoriz {
display: inline-block;
}
.circle {
display: table;
height: 200px;
width: 200px;
text-align: center;
background: red;
border-radius: 100%;
margin: 10px;
}
.square {
display: table;
height: 200px;
width: 200px;
text-align: center;
background: blue;
margin: 10px;
}
.content {
display: table-cell;
vertical-align: middle;
font-size: 30px;
font-weight: bold;
color: white;
}
#smallcircle {
display: inline-block;
height: 50px;
width: 50px;
background: green;
border-radius: 100%;
}