Many times we need to do word wrap using languages. I recommend use css for word wrapping. In this article, we explained about How to use word wrap with css
How to use word wrap with css
You can force long (unbroken) text to wrap in a new line by specifying break-word with the word-wrap property.
This is a problem with CSS layouts that use floated divs.
Use following code for fix the word wrap with all divs.
div { word-wrap: break-word }
instead of this we always use following css code:
overflow:hidden;
But this is not good practice. Use word-wrap css property.
Word-wrap is supported in IE 5.5+, Firefox 3.5+, and WebKit browsers such as Chrome and Safari.