JSFiddle - React, Tailwind, and code Playground

HTML

<div style="width:200px"> 
    <span style="float:left">left</span>
    <span style="float:right">right</span>
    <br/>
    <div style="position:relative">
        <span style="float:left">left</span>
        <span style="float:right">right</span>
    <div>
    <br/>
    <div style="position:fixed"> 
        <span style="float:left">left</span>
        <span style="float:right">right</span>
    </div>
</div>