CSS Hell simulating TABLE with DIV

后端 未结 8 1889
深忆病人
深忆病人 2020-12-10 03:40

I´m trying to simulate a table using only CSS and DIV. The problem is that nothing that I do can perfectly simulate a table layout behavior.

Below is the table layout

8条回答
  •  悲哀的现实
    2020-12-10 04:13

    This is a horrid answer, I can't believe I'm even suggesting it, BUT, if you are hell bent on making a table out of divs...

    As is stated in the comments, if it is a table, use a table, tables are not evil, they were just overused at one time to do things they weren't designed for. They are designed to display tabular data so if you can, use them.

    This is only suggested if you MUST make a table with divs

    There is a little known display property in CSS to help you with this, read here: table-cell css.

    Again, just use a table, if you can.

提交回复
热议问题