Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Html Table wrap text to column
September 3, 2008, 6:29 am
rate this thread
I have a column in a table, where it will contain a lot of different
things (e.g. Photo, link, another table, ....)
The size of the column is not fix (and not specify at all), because
different content will have different size, and the column will resize
But there is one problem, if the column contain Text (a very long
text), it will always cause the column to resize to its max.
How can I ensure that the Text wrap according to the dynamic size of
the column and DO NOT increase the colum n width?
Thanks in advance.
Re: Html Table wrap text to column
Does the text contain breaking opportunities? If not, then you can't
force it to break (unless you mess around with word-break characters
gambling on either Unicode or the non-standard <wbr>)
Otherwise setting a narrow width (e.g. 1px) on the cell containing the
text will in most browsers limit the effect of that cell on the width of
its column to at most stretching the column out to the cell's content