JSFiddle - React, Tailwind, and code Playground

by sikuda

HTML

<div class="container clearfix">
    <div class="fixed">Блок с известной шириной</div>
    <div class="stretch">Блок, заполняющий оставшееся место</div>
</div>

CSS

.clearfix:before,
.clearfix:after {
    content: " ";
    /*display: table;*/
}
.clearfix:after {
    /*clear: both;*/
}

.container {
    position: relative;
    height: 40px;
    background: #ddd;
    border: 1px solid #999;
    overflow: hidden;
}

.fixed {
    float: right;
    width: 200px;
    height: 40px;
    background: #eee;
}

.stretch {
    margin-left: 100px;
    height: 40px;
    background: #aaa;
    /*text-overflow: ellipsis;*/
    overflow: hidden;
}