• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 912
  • Last Modified:

How to wrap the long text in <td width="10">fdsdfsdfdsfdfdfdfdjdfjkdfjkdfjdkfjf</td>

Hi

How to wrap the testrejttjjhji43252363253256236236263545454 text in <td width="20">?


Thank you
0
mmsreddy
Asked:
mmsreddy
4 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
insert some <wbr/> into the value:

testrejttj<wbr/>jhji43252363<wbr/>25325623623<wbr/>6263545454<wbr/>
0
 
Raynard7Commented:
you can not wrap it unless you divide it up with spaces - browsers will not wrap unbroken character strings
0
 
DreamMasterCommented:
There is no way to force wrapping on very long strings. If you get a string that long into a TD that small, there may be more of a design problem. The solution as so many will say, is to make sure your text is not just a long string of characters. When there's no space between the characters, the browser assumes it is one word and it won't break it.

Regards,
Max.
0
 
pradeepsudharsanCommented:
Hi,

for text wrapping in TD ,use  <br> tag.

Example code:
-------------------------
<TD style="WIDTH: 20px"> gsdjbkbhjsbhf<br>gsdfdbhksjbnd<br>fhshkdfhssbhdsdbh<br>sdkhjksbhsdhshsh</TD>

output:
---------
gsdjbkbhjsbhf
gsdfdbhksjbnd
fhshkdfhssbhdsdbh
sdkhjksbhsdhshsh



Regards
Pradeep
0
 
sam85281Commented:
If you're on an apache server, give your page a .php extension and do:

<td style='width:20px;'><?php echo wordwrap("245245234523452345234523452345345", 5, "<br>"); ?></td>

The 5 is number of characters, so adjust is a necessary to fit.

-Sam
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now