JSFiddle - React, Tailwind, and code Playground

by alexb

HTML

<div class="container">
  <div></div>
  <div class="heading"><span>Exact Center</span></div>
  <div class="icon">🔥</div>
</div>

<div class="marker">
  <span></span>
</div>

CSS

.container {
  display: flex;
  font-size: 2em;
  justify-content: space-between;
}

.heading {
  text-align: center;
}

.heading span {
  background: lime;
}

.icon {
  border-radius: 2px;
  display: inline-block;
  background: cornflowerblue;
  text-align: center;
  width: 2em;
}

.marker {
  position: absolute;
  height: 100vh;
  width: 100vw;
  top: 0;
  text-align: center;
  z-index: -1;
}

.marker span {
  background: orangered;
  display: inline-block;
  width: 1px;
  height: 100vh;
}