JSFiddle - React, Tailwind, and code Playground

by martjemeyer

HTML

<div class="grandmother">
  <div class="content">

    <div id="centerhoriz">

      <div class="circle">
        <div class="content">
          Some text
        </div>
      </div>

      <div class="square">
        <div class="content">
          <div id="smallcircle">
          </div>
        </div>

      </div>
      <!-- center-horiz -->

    </div>
  </div>
  <!-- grandmother -->

CSS

.grandmother {
  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%;
}