.env {
border: 1px solid black;
display: inline-block;
}
.knob {
display: flex;
background: red;
}
.knob span {
flex: 0 0 4em;
}
<div class='env'>
<div class='knob'>
<span class='name'>attack</span>
<span class='name'>0 ms</span>
<input value='0' type='range'/>
</div>
<div class='knob'>
<span class='name'>attack</span>
<span class='name'>0.3 ms</span>
<input value='0.3' type='range'/>
</div>
<div class='knob'>
<span class='name'>attack</span>
<span class='name'>1 ms</span>
<input value='0' type='range'/>
</div>
</div>
I try to give a fixed width to text aside the input range, so they don't change width as the text changes from 0 to 0.3 etc.
I tried adding flex: 0 0 4em;
but it makes the range out of the parent, also it still moves as the text changes.