JSFiddle - React, Tailwind, and code Playground

by scispear

HTML

<body>
    <div class="clearfix">        
        <div class="menu">Stay right</div>
        <div class="text">
            Wide child element which determines the width of the page.
        </div>
    </div>
</body>

CSS

.text {
    white-space:nowrap;
    clear: both;
    font-size:2em
}

.menu {
    float: right;
}

.clearfix:after {
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
}
 
.clearfix {
    display: inline-block;
}
 
html[xmlns] .clearfix {
    display: block;
}
 
* html .clearfix {
    height: 1%;
}