一千萬個為什麽

搜索

為什麽我的html表'max-width'不會導致文本換行?

I have an html table and one column (or <td>) contains very long words. I want to set the max-width of the column so that if text is longer than the max-width the text should auto-wrap to next line. I have tried to set the CSS max-width style on the appropriate <td> element with "max-width:100px", but it does not work. The text is still very long and does not auto-wrap to next line.

Any ideas what is wrong or any solution reference code? I am using IE 8 on Windows 7.

最佳答案