HTML Table, first and last column fixed width and columns between dynamic, but equal width

前端 未结 7 1356
长发绾君心
长发绾君心 2021-01-04 09:35

Is it possible to have a table with width 100% (so the table fits the screen size), where the first and the last column have a fixed width, and the columns between take the

7条回答
  •  有刺的猬
    2021-01-04 09:56

    Nobody mentioned this one here trick:

    table{ table-layout: fixed; width: 100%; }
    th:first-child{ width: 300px; }
    
    
    yourfirst300pxcolumn fixedwidth fixedwidth also
    300somethingsomething else

提交回复
热议问题