JSFiddle - React, Tailwind, and code Playground
HTML
Demo
<br />
<br />
The first line of the table is ok: when the window is resized we see '...' colored in black at the end of the line.
<br />
<br />
The second line of the table is not ok: when the window is resized we see'...' in yellow (the color of the first span) and the font-size is also smaller (the font-size of the span).
<br />
<br />
<table>
<tr>
<td> First line </td>
<td>111111111111 sssssssssssssss ssssssssssssssss sssssssssssssssss sssssssssssssssss</td>
</tr>
<tr>
<td> Second line </td>
<td><span class="dark-label">Hello</span><span class="ellip">2222222222222 sssssssssssssss ssssssssssssssss sssssssssssssssss sssssssssssssssss</span></td>
</tr>
</table>
CSS
table { table-layout:fixed; width: 100%; white-space: nowrap; }
table.list td { border-bottom: 1px dotted #d9d9d9; height: 25px; padding-bottom: 2px; }
table.list th { text-align:left; }
table td:nth-child(1) { width: 90px; }
table td:nth-child(2) { width: auto; white-space: nowrap; max-width: 100%; overflow:hidden; text-overflow: ellipsis; }
.dark-label
{
max-width: 100%;
text-align:left;
margin: 2px 6px 0px 0px;
padding: 3px 7px 3px 7px;
font-size: 10px;
font-weight: normal;
overflow: hidden;
position: relative;
top:-1px;
height: 14px;
width: auto;
color: Yellow;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
white-space: nowrap;
background-color: Red;
}