Internet Explorer 8 bug with display: table

前端 未结 2 2022
栀梦
栀梦 2020-12-17 03:42

I have the weirdest bug ever... I\'m experimenting with display: table, and my proof of concept works on the very first try after opening a new process, but any subsequent r

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-17 04:05

    The problem when the browser is in compatibility view. (as suggested by taylorjes)

    When the page is displayed in normal view, the cells are horizontal. When displayed in compatibility view, the cells are vertical.

    As I said in my comment, I would highly discourage the display:(table/table-row/table-cell) CSS property. It is not well supported and is bound to have quirks.

    Honestly if what you are displaying is tabular data, then use a table. Tables are only evil when used for layout.

提交回复
热议问题