Solved

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

Posted on 2006-07-06
7
881 Views
Last Modified: 2008-02-01
Hi

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


Thank you
0
Comment
Question by:mmsreddy
7 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 32 total points
ID: 17049821
insert some <wbr/> into the value:

testrejttj<wbr/>jhji43252363<wbr/>25325623623<wbr/>6263545454<wbr/>
0
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 31 total points
ID: 17049825
you can not wrap it unless you divide it up with spaces - browsers will not wrap unbroken character strings
0
 
LVL 19

Assisted Solution

by:DreamMaster
DreamMaster earned 31 total points
ID: 17049870
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
 
LVL 7

Expert Comment

by:pradeepsudharsan
ID: 17050330
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
 
LVL 16

Assisted Solution

by:sam85281
sam85281 earned 31 total points
ID: 17051599
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question