JSFiddle - React, Tailwind, and code Playground
by isqua
HTML
<table>
<tr>
<td></td>
<td class="union-cell">
<div class="union-strut">
<div class="union-strut-wrapper" data-last-title="Второй">
<div class="union">
<div class="union-content">Шляпа</div>
</div>
</div>
</div>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>Первый столбец</td>
<td>Второй</td>
<td></td>
</tr>
<tr>
<td>1</td>
<td>100500</td>
<td>1010101010101</td>
<td>fadfasfd</td>
</tr>
<tr>
<td>2</td>
<td>100500</td>
<td>1010101010101</td>
<td>fadfasfd</td>
</tr>
</table>
CSS
td {
font-family: Arial;
padding-right: 10px;
}
.union-cell {
height: 1em;
position: relative;
}
.union-strut {
position: absolute;
left: 0;
right: 0;
background: yellow;
}
.union-strut-wrapper {
position: absolute;
left: 0;
top: 0;
padding-left: 100%;
}
.union-strut-wrapper::after {
content: attr(data-last-title);
height: 0;
overflow: hidden;
display: inline-block;
}
.union {
position: absolute;
left: 0;
right: 0;
display: flex;
}
.union::before,
.union::after {
content: " ";
flex: 1 0 auto;
border-top: 1px solid #ccc;
height: .5em;
}
.union::before {
border-left: 1px solid #ccc;
}
.union::after {
border-right: 1px solid #ccc;
}
.union-content {
position: relative;
top: -0.5em;
padding: 0 5px;
}
}