Why doesn't IE respect table width with fluid image child

前端 未结 1 1544
灰色年华
灰色年华 2020-12-16 18:57

Consider the following code:

HTML:

相关标签:
1条回答
  • 2020-12-16 19:37

    If you specify table-layout: fixed; in the table css it works.

    There seems to be some contradictory terminology in the standard regarding table layouts. In particular, table-layout: auto; says this:

    The column width is set by the widest unbreakable content in the cells

    Since the images content is unbreakable, it sets the width of the cell to the size of the content. The max-width seems to be overriden by it.

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