JSFiddle - React, Tailwind, and code Playground

by Mansfield

HTML

<div class="parent">
    <div class="child-left">
        this div should have variable size, and should not push over the right div
    </div>
    <div class="child-right">
        here's my right text <br />
        its size should be constant
    </div>
</div>

CSS

div.parent
{
    width: 100%;
}

div.child-left
{
    width: 100px;
    background-color: lime;
    display: inline-block;
    vertical-align: top;
}

div.child-right
{
    background-color: red;
    width: 200px;
    display: inline-block;
    vertical-align: top;
    right: 0px;
}