Solved

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

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

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


Thank you
0
Comment
Question by:mmsreddy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

729 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