Html Table wrap text to column

C

CKKwan

Dear All,

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
itself nicely.

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.
 
D

dorayme

Ben C said:
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
minimum width.

Or perhaps settle on a max width, in whatever units suits, for an
element like a <p> in which to hold the text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top