JSFiddle - React, Tailwind, and code Playground
HTML
<section class="width-td">
<h1>Cell width</h1>
<!-- ширина ячейки - content -->
<div class="bs-content">
<p>content-box</p>
<div class="item div-item"></div>
<table class="item table-item">
<tr>
<td> </td>
</tr>
</table>
</div>
<!-- ширина ячейки - border -->
<div class="bs-border">
<p>border-box</p>
<div class="item div-item"></div>
<table class="item table-item">
<tr>
<td> </td>
</tr>
</table>
</div>
</section>
<section class="width-tbl">
<h1>Table width</h1>
<!-- ширина таблицы - content -->
<div class="bs-content">
<p>content-box</p>
<div class="item div-item"></div>
<table class="item table-item">
<tr>
<td> </td>
</tr>
</table>
</div>
<!-- ширина таблицы - border -->
<div class="bs-border">
<p>border-box</p>
<div class="item div-item"></div>
<table class="item table-item">
<tr>
<td> </td>
</tr>
</table>
</div>
</section>
CSS
html {
font-family: "Segoe UI", Arial, Sans-Serif;
}
h1 {
font-size: 24pt;
}
section {
border-bottom: 1px dashed #ccc;
margin: 15px 0;
padding: 10px 0 25px 0;
}
.width-td .table-item td {
width: 100px;
border: 25px solid #444;
height: 100px;
display: inline-block;
}
.width-tbl .table-item {
width: 100px;
border: 25px solid #444;
height: 100px;
}
.item {
background: #ebebeb;
outline: 1px dotted #4d9fec;
outline-offset: 1px;
display: inline-block;
}
.table-item {
table-layout: fixed;
border-collapse: separate;
}
.div-item {
width: 100px;
height: 100px;
margin-right: 5px;
border: 25px solid #444;
}
.bs-content p, .bs-border p {font-size: 80%; margin: 10px 0; color: #999;}
.bs-content, .bs-border {display: inline-block; margin-left: 100px; white-space: nowrap;}
.bs-content .div-item, .width-td .bs-content .table-item td, .width-tbl .bs-content .table-item {
box-sizing: content-box;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
.bs-border .div-item, .width-td .bs-border .table-item td, .width-tbl .bs-border .table-item {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}