-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
If the value of width is something other than min-content, then break-word and anywhere will have the same results.
but in my testing, break-word and anywhere is different in table when width is auto, can you help
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
}
td,
th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
td {
width: auto;
/* overflow-wrap: break-word; */
overflow-wrap: anywhere;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
</head>
<body>
<h2>HTML Table</h2>
<div style="width: 600px;">
<table>
<tr>
<th>Column1</th>
<th>Column2</th>
</tr>
<tr>
<td>Centro comercial
MoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezumaMoctezuma
</td>
<td>Centro comercial
</td>
</tr>
</table>
</div>
</body>
</html>Metadata
Metadata
Assignees
Labels
No labels