Solved

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

Posted on 2006-07-06
7
870 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 142

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now