Chrome-specific CSS issue setting table cell to display:block

前端 未结 3 580
甜味超标
甜味超标 2021-01-02 17:14

I found this question that seemingly had what I wanted. I am using chrome 32.0.1700.102 and even the fiddle on the first answer amazingly works fine for me.

However

3条回答
  •  走了就别回头了
    2021-01-02 17:21

    I don't see any DOCTYPE declared in the document, when you don't declare a doctype, Chrome overrides the display: block; with display: table-cell;

    It works on JS Fiddle cuz they have doctype declared.

    So use at the very top of the document before and it should fix the issue.

提交回复
热议问题