I have to build a table with 5 columns. The table width is variable (50% of content width). Some columns contain fixed-size buttons, so those columns should have a fixed with, s
You could set the table-layout: fixed for the JSFiddle Demo. From the MDN: The Values: fixed:table element, then simply set width attribute on relevant or elements:
table {
table-layout: fixed;
}
table-layout CSS property defines the algorithm to be used to
layout the table cells, rows, and columns.
Table and column widths are set by the widths of table and col elements or by the width of the first row of cells. Cells in subsequent rows do not affect column widths.