If you want to preserve the overall width of the table, you can check it before hiding the row and explicitly set the width style property to this value:
table.style.width = table.clientWidth + "px"; table.rows[3].style.display = "none";
However, this may result in individual columns being paid when hiding the row. A possible way to mitigate this is to add style to the table:
table { table-layout: fixed; }
levik
source share