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
精彩评论