JSFiddle - React, Tailwind, and code Playground

by kmouse

HTML

<div class="center A clip" id="A1">
  Duck aloft
  <div class="B" id="B">
    B
  </div>
  C
</div>
<div class="center A clip" id="A2">
  D
  <div class="C clip" id="C">
    E
    <div class="D" id="D">
      Some long text
    </div>
    F
  </div>
  G
</div>

CSS

div {
	border-style: solid;
}

.center {
	margin: 20px auto;
}

.clip {
	overflow: hidden;
}

.A {
	position: relative;
	width: 450px;
	border-color: #55f;
	border-width: 20px;
	border-radius: 150px;
}

.B {
	height: 120px;
	background: #ffd34f;
	border-color: #f57;
	border-width: 5px;
}

.C {
	position: relative;
	left: 10%;
	width: 50%;
	overflow: auto;
	background: #ffd34f;
	border: 5px solid #f57;
}

.D {
	width: 50%;
	position: relative;
	top: 60px;
	margin: 10px auto;
	height: 50px;
	background: #d3ff4f;
	border: 5px solid #3a4;
}