Wrap a word without spaces in a div
I have a div that has a fixed width, 300px. I have user entered text that needs to go into a div. The problem is that people are investing in the word "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" in the case. This causes the text to exceed the width of the div. I would like the text to wrap around even if there are no spaces in the words. Is there a way to do this using css? I tried the css property white-space
but it didn't work.
If anyone has a solution or a point in the right direction would be great.
+3
source to share