Adjusting table cell width

后端 未结 5 1260
臣服心动
臣服心动 2020-12-17 18:05

Let\'s take 4 table columns - ID, Text, Date, Action. In my case table have always constant width - in example 960px.

5条回答
  •  渐次进展
    2020-12-17 18:56

    Try this:

    .id, .date, .action is the table cells (td).

    CSS:

    .id, .date, .action {
       width: 1em;
    }
    

    It worked for me.

    The width:1em will not cut the text but force the width size to the minimum.

提交回复
热议问题