Search code examples
htmlcsscss-tables

Should I use HTML table layout or the new CSS display:table-cell code?


I've used tables but never used the CSS way of doing things. Now I have a table of data with 3 rows and 2 columns. Can someone please explain how I can do this with CSS DIVs and also most important is I would like to know if CSS is the way to do this and what are the limitations.


Solution

  • If it's a table of data, then the best (and most semantic) choice is to just stick with a good old <table>.


    The support for display: table-cell is good, see: http://caniuse.com/#search=table

    It will work in all modern browsers, and IE8+.

    It won't work in IE7, which is a limiting factor for some people.