Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have "td with attributes width="25%" and wrap="wrap"" . But if I give a lengthy string of about 100letters the width of the "td" varies. Instead, the word should break and come to next line. Please help me to do this.
Thank You
Posted
Updated 3-May-12 1:18am
v2

hi,

add a css class for the TD like "myTD" and add this style into your page

CSS
<style type="text/css">

.myTD{
  display: inline-block;
  width: 200px;
}

</style>


here you can set the width as you required.
hope this will help
 
Share this answer
 
Comments
maajanes 3-May-12 7:14am    
Its not working friend. Can you suggest anything else.
A single 100 character word will not wrap it to next line, you will have to add space in between if you want it to wrap...
 
Share this answer
 
Comments
maajanes 3-May-12 9:41am    
No other options?
PJ003 4-May-12 3:55am    
I doubt...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900