How to make table cell shrink according to the content?

前端 未结 4 589
野性不改
野性不改 2021-02-02 05:25

How can I make the table with 2 columns (cells) look like this:

  • First cell is shrink according to the content
  • The other cell fits the rest of the table (w
4条回答
  •  逝去的感伤
    2021-02-02 06:06

    If the total size of the table is 500 pixels and will not pass, put td{max-width: 500px;}; If the minimum value is 500 pixels, td {min-width: 500px;}; Look this exemple.

提交回复
热议问题