Table with 3 columns. Fixed center column width. How to have shared width on other two columns?

后端 未结 3 1779
南旧
南旧 2021-01-12 03:22

i have a 100% width table with 3 columns. The center column must be 600px width. How can I have the other two equal width while using up the remaining space?

3条回答
  •  感情败类
    2021-01-12 03:47

    The use of "colgroup" tag could be a great help for this.

    First Column Third Column
    AAAAAA BBBB CCCCC
    AAAAAA BBBB CCCCC
    AAAAAA BBBB CCCCC
    .fixed-center-table { table-layout: fixed; width: 100%; border-collapse: collapse; } .fixed-center-table td{ text-align: center; } col#middle-column { width: 600px; }

提交回复
热议问题