Ah yes, the classic CSS torture device — where the table scrolls for eternity and the text just whispers, ‘I used to wrap... once.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The Scrollening</title>
<style>
.scroll-container {
width: 300px;
overflow-x: auto;
border: 1px solid #999;
white-space: nowrap;
}
table {
border-collapse: collapse;
min-width: 600px;
}
th, td {
border: 1px solid #ccc;
padding: 8px;
text-align: left;
}
.wrap-me-please {
max-width: 150px;
white-space: normal;
word-wrap: break-word;
}
</style>
</head>
<body>
<div class="scroll-container">
<table>
<tr>
<th>ID</th>
<th class="wrap-me-please">Long Column That Just Wants to Wrap But Is Doomed to Stretch Forever</th>
<th>Date</th>
</tr>
<tr>
<td>1</td>
<td class="wrap-me-please">
This text is long, like a StackOverflow answer with 3 edits and a war in the comments.
</td>
<td>2025-04-23</td>
</tr>
</table>
</div>
</body>
</html>