开发者

Hiding text in a table cell

Like the title says, I have a table with many rows and columns. The text within the cel开发者_如何学JAVAls will be populated dynamically. If a column has a set width and the amount of characters exceeds this width, I want the excess text to be hidden rather than the column made wider. How can i achieve this? i tried overflow:hidden in the <td> style without success.


you need to put div inside td - div can handle overflow: hidden

Or make table layout fixed using table style - this will cause table will not change columns width automatically

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜