display:table versus using tables

前端 未结 8 1053
余生分开走
余生分开走 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:40

    If the information being displayed on the forum is tabular, then don't be afraid to use a table if it makes sense semantically.

    For general page layout, personally I wouldn't use it. I'd stick to the typical block-level div layouts and floats. IE7 does not support display:table and there are other caveats, such as the fact that it will expand in width based on content. For the future, I look forward to when flexbox is fully supported.

    I do occasionally use display:inline-block for centering dynamic list items and the like.

提交回复
热议问题