View Full Version : Help!:IS there a way Auto wrap text in a table cell..
01-06-2003, 10:16 PM
Is there a way to auto wrap text in a table cell?
What I mean by this is if the text exceeds the dimensions of our cell can we force it to go to the next line instead pushing the cell over and making it larger!
01-06-2003, 10:28 PM
yes, you just need to define the width of the cell.
Nevertheless, if one word is longer as the defined width, the cell becomes wider anyway.
Hope this helps...
01-06-2003, 10:32 PM
I guess that is where the reall challenge comes into play. In this particular cell that is all they are is groupings of letters and numbers to equal a partnumber.
So I need to find something that if the characters are > a certain number then it forces a line break.
01-07-2003, 05:49 AM
Just make it the size of the largest part #. :)
...or try wrap="wrap"...
...or maybe a textarea in the cell. :D
Arghhh!!!! wrap is not a listed attribute in the W3C HTML 4.0 Spec.
I'm having the same problem where my table is not wrapping text. I suspect because there's no spaces in the content (its an email address). The table is dynamically generated and the widths are configurable (via servlet stuff). I noticed that width is deprecated in the w3c spec. oddly enough the following note exists for the 'nowrap' attribute (I want wrap).
Style sheets should be used instead of this attribute to achieve wrapping effects. Note. if used carelessly, this attribute may result in excessively wide cells
Since my stuff is dynamically generated, I'm not sure that this is a viable option (I guess I can use the style attribute, so maybe this will work). How would one achieve strict character wrapping of a TD via style sheet? Is it as simple as style='width:30em' ???
I guess I'll have to try it to see if this is any better than TD width='30em'
(Who said rap is dead?!)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.