dataTables automatic linebreak in cell

2019-09-17 19:57发布

问题:

I have a boostrap modal with a dataTables-table in it. I have a issue where cells with content with no spaces or linebreaks increases the width of the tables outside of the modal.

How can i fix this? See image below

回答1:

Try applying the following css to the cell:

word-break:break-all;

Check JSFIDDLE

If that doesn't work for you ... try working with white-space

white-space: normal;