CSS text-overflow in a table cell?

后端 未结 12 1065
情话喂你
情话喂你 2020-11-22 04:38

I want to use CSS text-overflow in a table cell, such that if the text is too long to fit on one line, it will clip with an ellipsis instead of wrapping to mult

12条回答
  •  春和景丽
    2020-11-22 05:18

    It seems that if you specify table-layout: fixed; on the table element, then your styles for td should take effect. This will also affect how the cells are sized, though.

    Sitepoint discusses the table-layout methods a little here: http://reference.sitepoint.com/css/tableformatting

提交回复
热议问题