How to make text in cell wrap?
How to make text in cell wrap?
Example:
For a string "abcde fgh ijk", the result should be:
Name
---------
abcde fgh
ijk
This works out of the box, but the below scenario doesn't.
For a string "abcdefghijk", the result should be:
Name
----------
abcdefghij
k
Instead, the text doesn't get wrapped and a horizontal scroll bar gets added. Which I don't want.
How can I prevent the scroll bar being added?
In Chrome(58), the following rule works:
word-break: break-word;
But it doesn't in Firefox(53) and IE(11), since the value break-word
is not available for these browsers.
Answers
word-break:break-all ?
@bindrid
I did try
word-break:break-all
prior to posting my question here, but the result it gives is not the one I want. Check the below screenshot, and the image in the middle is the result ofword-break: break-all
.Check this out, https://i.stack.imgur.com/QuWb9.png. I am looking for something similar to the one on the left(Chrome) but that works in FIrefox and IE.
Or simply put, I want a replacement for the css rule
word-break: break-word;
I've posted a question addressing the same issue on SO: https://stackoverflow.com/questions/44073958/how-to-make-text-in-cell-wrap