Global Warming


Posted by
balakrishnan
at
11:32 PM
4
comments
Labels: Global Warming
Posted by
balakrishnan
at
10:26 AM
0
comments
Labels: Kamal
Many of us face the problem of breaking the string which is dynamically generated, in html / jsp.For example the following the code will give you the problem of not wrapping the sentence in the table cell.
<table><tbody><tr><td>Name:</td> <td>BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN; </td></tr></tbody></table>
The reason is html engine wraps the content when there is a space in between the words. To avoid this just add this style in your table cell style="WORD-BREAK:BREAK-ALL;"
Modified code is
<table><tbody><tr><td>Name:</td> <td style="WORD-BREAK:BREAK-ALL;"> BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN;BALAKRISHNAN; </td></tr></tbody></table>
Posted by
balakrishnan
at
3:15 AM
0
comments
Labels: JSP