Here's the starter code:
table {
border: 1px solid black;
max-width: 300px;
}
td:first-child {
border-right: 1px solid black;
}
td {
white-space: nowrap;
overflow-x: hidden;
}
<table><tr><td>Lorem Ipsum is simply dummy text of the printing and typesetting industry</td><td>22</td></tr></table>
Further explanation:
I want to create a table that will calculate its columns' widths on its own, but have some max width. The catch is I can't have the text inside my td wrap, but it's fine if it's hidden with overflow property.
(If you haven't run the code: the table basically ignores the max-width)
Can this be done?