How do I set the table cell widths to minimum except last column?

前端 未结 7 1480
独厮守ぢ
独厮守ぢ 2020-12-07 11:44

I have a table with 100% width. If I put s in it, they get spread out with equal length columns. However, I want all the columns except last to have a

7条回答
  •  春和景丽
    2020-12-07 12:13

    If you need multiple text lines in table cell.

    Do not use white-space: nowrap use white-space: pre; instead.

    In table cell avoid any code format like new lines and indention (white-space) and use
    to set a new text line/row. Like this:

    element1
    second row

    Demo on CodePen

提交回复
热议问题