display:table versus using tables

前端 未结 8 1008
余生分开走
余生分开走 2021-01-06 03:18

I was wondering if it\'s a good idea to use CSS display property to emulate tables for a veeeery simple forum system.

I know this wasn\'t good thing to do like 2 yea

8条回答
  •  花落未央
    2021-01-06 03:37

    display: table is great for situations where you want a grid-like layout, but for non-tabular data. It's supported since IE8, so you can definitely use it. If all browsers supported the CSS grid proposal, then I'd say display: table has basically no use, but support is not very good.

    Personally, I think a forum is a great example of a grid-like layout for non-tabular data. But, I've gotten into arguments on StackOverflow in the past about what exactly "tabular data" is; I err on the very strict side of "table 1: numbers and figures," whereas others seem to lean toward saying that tabular is synonymous with "arranged in a grid."

提交回复
热议问题