JSFiddle - React, Tailwind, and code Playground
HTML
<div class="ss"></div>
<div class="sss">
<div class="sf"></div>
<div class="sp"></div>
</div>
CSS
.ss{
background: #000;
height: 20px;
max-width: 400px;
width: 100%;
margin: auto;
}
.sss{
width: 100%;
height: 20px;
display: flex;
}
.sf{
width: calc(100% - 500px);
background: green;
height: 30px;
}
.sp{
width: 500px;
height: 30px;
background: red;
}