JSFiddle - React, Tailwind, and code Playground
HTML
<div id='container'><div id='sticky'>x</div></div>
CSS
#sticky {
width: 100px;
height: 100px;
background: red;
float: right;
}
#container {
width: 900px;
height: 200px;
background: blue;
}