.eltops {
display: flex;
background: #eee;
color: white;
}
.elmark {
background: blue;
}
.sbtn {
background: green;
border-right: 2px solid gold;
padding: 0 9px;
}
<div class='eltops'>
<div class='elmark'></div>
<div class='sbtn'>X</div>
<div class='sbtn'>P</div>
</div>
<br>
<div class='eltops'>
<div class='elmark'></div>
<div class='sbtn'>X</div>
<div class='sbtn'>P</div>
<div class='sbtn'>C</div>
</div>
.eltops is a row of elements
.elmark is always single. It is empty (without any text inside) and should be on the left side and stretched via all available space.
.sbtn are of various count (2-3-4-5) and should be on the right side
how to do this, using flex or grid?