JSFiddle - React, Tailwind, and code Playground
HTML
<div class="table">
<div class="row">
<div class="col col-left"><span>Some text</span></div>
<div class="col"><span>1.123</span></div>
</div>
<div class="row">
<div class="col col-left"><span>text</span></div>
<div class="col"><span>1.432</span></div>
</div>
</div>
CSS
* {
margin: 0;
padding-bottom: 0;
}
body {
padding: 10px;
}
span {
background: #000;
border-radius: 5px;
color: #fff;
display: block;
font-size: 16px;
padding: 1px 5px;
text-align: center;
white-space: nowrap;
}
.table {
display: table;
width: 1%;
}
.row {
display: table-row;
}
.col {
display: table-cell;
padding: 1px;
}