Is there a solution to use word-break
on white-space: pre
?
I got a list like this, all came from data base
, and I can't change it to ul li
, but I want to show up like that so I then used white-space: pre
, but it does not break words.
td {
white-space: pre;
word-break: break-word;
}
table {
width: 100px;
border: 1px solid black;
display: block;
}
<table>
<tr><th>list</th>
<td>
1.testtesttesttesttesttesttesttesttest
2.hihihihihihihihihihihihihihihihihihi
3.hurayhurayhurayhurayhurayhurayhuray
4.testtesttesttesttesttesttesttesttest
</td>
</tr>
</table>
Or use something like white-space: pre
to break each item to new line with breaking words?
<ol>
? That would be far more semantic.database
it's not just a one entryhtml
tags @BenM