JSFiddle - React, Tailwind, and code Playground

HTML

<div class="parent">
</div>

CSS

.parent{
  border: 1px solid black;
  width: 400px;
  height: 300px;
  position: relative;
}

.parent::after {
  content: "Pseudo child text";
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  border: 1px solid red;
  display:flex;
  flex-direction:row;
  align-items: center;
  justify-content: center;
}