I have a table with one TR and 2 TD\'s. I want the first TD to adjust width automatically depending on its content, and the second TD to use up the remainder of the width.>
Setting white-space: nowrap
on all cells except for the last one, and giving the last one 100% width, worked for me:
td:not(:last-child), th:not(:last-child) {
white-space: nowrap;
}
td:last-child, th:last-child {
width: 100%;
}
This will make sure that text wrapping still works while still filling the table when space is available.