I was referred here from stackoverflow as my question was apparently too broad.

I'm working on a template, and I know using CSS is preferred over HTML tables for positioning... But, is it acceptable to get the best of both worlds and use table-like styles on my divs? For example:

display: table;

This not only helps solve the sticky footer problem, but it also avoids the pains associated with using floats. Somehow it feels dirty, but I can't logically explain why because it works without any "tricks" or ugly hacks, which is how it should be, right?

Is this technically incorrect, or does it ultimately boil down to just a matter of opinion? ...Thoughts?

  • Don't forget about using table layouts for email!
    – Mikhail
    Commented Nov 16, 2012 at 3:23
  • Yes! Please use them if you're not supporting IE<=7. CSS has nothing to do with that issue, which went on and on for years, in part because the one argument the tables-as-layout douchebags had that we couldn't really challenge was that you couldn't vertically center in IE without explicit heights set because !@#$ing IE took 10 years after Netscape Navigator implemented to finally put table-display in a version of IE with IE8. So please use it. Revel in the vertical centering glory. Unless of course you actually need a table. Then use table HTML. Commented Nov 26, 2013 at 8:43
  • @ErikReppen - Thanks for confirming my hunch that the debate in question was fueled as much by personal animus ("tables-as-layout douchebags") as by any technical concern. Commented Oct 22, 2014 at 21:02

2 Answers 2


Using tables for layout is discouraged because it is semantically wrong -- table markup is supposed to be for tables and specifically for tabular data. Your HTML says what something is (e.g. a table, a paragraph, or a generic text division) CSS is just instructions for displaying it.

If it's consistent across browsers that are important to you, whether it's displayed as a block or a table is no different than whether it's displayed in red or green. Table and table-cell display properties are often cited as good methods for dealing with problems like vertical centering.


IE7 doesn't support 'display: table', so you can only use it for IE8 and up. Other browsers handle it fine, mostly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.