I change the width in div.example . At the same time, I would like the width of the first 3 columns to remain the same, but only the 4th (made specifically for this) would expand:
<table border="1" style="empty-cells: show;"> <tr> <td>ячейка-1</td> <td>cell-1</td> <td>data-1-2-3</td> <td></td> </tr> <tr> <td colspan="4"> <div class="example" style="width: 300px;"> div.example </div> </td> </tr> </table> I would like to get this:
Border I added for clarity, they are not needed.
You can set the last cell width: 99% , but then the whole table expands. The merged cell can be set to overflow-x: visible (and remove the fourth cell), but this will not work if the width is not fixed.
In the end, these rows will be repeated, and it is necessary that the columns have the same width (therefore I cannot make the table separately):
<table border="1" style="empty-cells: show;"> <tr> <td>ячейка-1</td> <td>cell-1</td> <td>data-1-2-3</td> <td></td> </tr> <tr> <td colspan="4"> <div class="example" style="width: 300px;"> div.example </div> </td> </tr> <tr> <td>text</td> <td>long-long-text</td> <td>1</td> <td></td> </tr> <tr> <td colspan="4"> <div class="example" style="width: 300px;"> div.example </div> </td> </tr> </table> 
<td width="75">(width in pixels) does not help? - Enikeyschik