Thursday, July 24, 2008
Friday, July 4, 2008
Dasavatharam has no story?
Posted by balakrishnan at 10:26 AM 0 comments
Labels: Kamal
Friday, June 27, 2008
Text break in jsp / html
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