How is table layout fixed rendered?

前端 未结 1 1017
囚心锁ツ
囚心锁ツ 2021-01-20 21:57

How is table layout fixed rendered? According to 17.5.2.1 \"Fixed table layout\" (from W3):

In the fixed table layout algorithm, the width of each col

相关标签:
1条回答
  • 2021-01-20 22:18

    Reading further in the spec, you will find

    17.5.2.1 Fixed table layout

    With this (fast) algorithm, the horizontal layout of the table does not depend on the contents of the cells; it only depends on the table's width, the width of the columns, and borders or cell spacing.

    The table's width may be specified explicitly with the 'width' property. A value of 'auto' (for both 'display: table' and 'display: inline-table') means use the automatic table layout algorithm. However, if the table is a block-level table ('display: table') in normal flow, a UA may (but does not have to) ...

    So, if you want to make sure that fixed table layout is used at all, set the width property of the table

    0 讨论(0)
提交回复
热议问题