JSFiddle - React, Tailwind, and code Playground

by austinfrance

HTML

<div id="container">
<div id="field">
</div>
<button class="right-align">X</button>
</div>

CSS

#container {
  position: absolute;
  background-color: rgba(0,0,255,0.25);
  top: 10px;
  left: 10px;
  width: 200px;
  height: 22px;
  z-index: 1055;
}

#field {
  width: 100%;
  float: left;
  height: 22px;
  background-color: rgba(255,0,0,0.2);
}

.right-align {
  position: absolute;
  width: 25px;
  height: 100%;
  box-sizing: border-box;
  right: -25px;
}