Is there a way to hide table rows without affecting the overall table width? I\'ve got some javascript that shows/hides some table rows, but when the rows are set to d
d
CSS rule visibility: collapse was designed exactly for that.
tbody.collapsed > tr { visibility: collapse; }
After adding this CSS you could trigger visibility from JS with:
tbody.classList.toggle('collapsed');