JSFiddle - React, Tailwind, and code Playground
by confile
HTML
<div class="indicator"></div>
<div class="mainPanel">
<div>Speichern</div>
<div>Style</div>
<div>Speichern</div>
</div>
<br>
<br>
<div class="indicator"></div>
<div class="mainPanel">
<div>Speichern</div>
<div>Style long long long long</div>
<div>Speichern</div>
</div>
<br>
<br>
<div class="indicator"></div>
<div class="mainPanel">
<div>L</div>
<div>Style</div>
<div>Speichern</div>
</div>
<br>
<br>
<div class="indicator"></div>
<div class="mainPanel">
<div>L</div>
<div>Style Style Style Style Style Style Style Style Style</div>
<div>Speichern</div>
</div>
CSS
.indicator {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
width: 150px;
height: 50px;
border-right: 1px solid red;
z-index: -10;
}
.mainPanel {
width: 300px;
height: 50px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.mainPanel > div {
padding: 0 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1 1 25%;
border: solid 1px #999;
}
.mainPanel > div:nth-child(1) {
background: red;
display: inline-block;
}
.mainPanel > div:nth-child(3) {
background: lime;
}
.mainPanel > div:nth-child(2) {
flex: 900 0 auto;
background: yellow;
text-align: center;
}