how to set html table max-width?

Posted by George2 on Stack Overflow See other posts from Stack Overflow or by George2
Published on 2010-04-17T15:29:13Z Indexed on 2010/04/17 15:33 UTC
Read the original article Hit count: 292

Filed under:

Hello everyone,

I have an html table, and one column (<td>) has long text, so I want to set the max-width of the column -- so that if text is longer than the max-width, the text could auto-wrap to next line. I have tried to use css max-width style on related TD element of the column, something like "max-width:100px", but it does not work (text still very long and not auto-wrap to next line if it is very long).

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

thanks in advance, George

© Stack Overflow or respective owner

Related posts about html