...

View Full Version : td length



heaps21
03-03-2004, 01:09 PM
Im sure this is a very simple question but here goes. I am retrieving some text from a db field and want to display it in a cell. If it is more than say 50 characters I want it to wrap onto a new line within the same td... Is this easy to do?
Thanks in advance.

Spudhead
03-03-2004, 01:36 PM
unless I'm mistaken, <td width=50> should produce a td that's 50 pixels wide.

heaps21
03-03-2004, 03:11 PM
I have tried that, but if the text that is being put in the cell takes up more than 50 pixels it seems to ignore it and make it as long as it needs to

requestcode
03-03-2004, 03:38 PM
How are you defining the width of the table? If you are using a percentage rather than a fixed number then I believe the td will expand to the width of the table.

Antoniohawk
03-06-2004, 05:49 AM
If you declare it as <td width="50"> the text should wrap to the next line. Can we see your code?

Steveo31
03-06-2004, 06:50 AM
Originally posted by Antoniohawk
If you declare it as <td width="50"> the text should wrap to the next line. Can we see your code?
Agreed. Adding quotes is somethin you should do, especially since XHTML is comin up in the ranks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum