JSFiddle - React, Tailwind, and code Playground

HTML

<div id="fixed">
    <div class="inner">div </div>
    <div class="inner">d</div>
    <div class="inner">d</div>
     <div class="inner">ddd</div>       
<div>

CSS

#fixed{
    height:150px;
    border:1px red solid;
    width:500px;
}

.inner{
    float:left;
    background-color:#999999;
    text-align:center;
     
}

JavaScript

$('.inner').each(function(){
    
    $(this).width(($('#fixed').width() / $('.inner').size()));
 
})