Table with table-layout: fixed; and how to make one column wider

后端 未结 4 1676
甜味超标
甜味超标 2020-12-01 03:53

So I have a table with this style:

table-layout: fixed;

Which makes all columns to be of the same width. I would like to have one column (t

4条回答
  •  眼角桃花
    2020-12-01 04:32

    The important thing of table-layout: fixed is that the column widths are determined by the first row of the table.

    So

    if your table structure is as follow (standard table structure)

    if you would like to give a width to second column then

    
    

    Please look that we style the th not the td.

    提交回复
    热议问题
    First column Second column Third column
    First column Second column Third column