Equal sized table cells to fill the entire width of the containing table

后端 未结 3 981
孤城傲影
孤城傲影 2020-12-05 09:33

Is there a way using HTML/CSS (with relative sizing) to make a row of cells stretch the entire width of the table within which it is contained?

The cells should be e

3条回答
  •  情书的邮戳
    2020-12-05 10:02

    Using table-layout: fixed as a property for table and width: calc(100%/3); for td (assuming there are 3 td's). With these two properties set, the table cells will be equal in size.

    Refer to the demo.

提交回复
热议问题