4

Possible Duplicate:
Is there a disadvantage of using display:table-cellon divs?

I think display:table is a easy way of managing the layout of a webpage, at least a general layout. But it looks like it is not widely used. I know it is unsupported or has issues wit ie6 and ie7 but for sites not trying to be compatible with those browsers there is any drawback from using display:table?

Community
  • 1
  • 1
Jordi
  • 1,212
  • 2
  • 11
  • 25
  • 2
    As I answered in the linked question (which I think is a dupe): if you don't care for IE6/7 and it works in your situation, then use it. There aren't any hidden pitfalls. – thirtydot Jun 14 '11 at 13:57

1 Answers1

0

You may be thinking of this in terms of the table element within html. To answer your question in that sense, yes. Positioning elements with display:table in css is more or less just a way of forming a table-like display to correctly position an element. It requires less hassle in the way of floating div's and such. As long as you are just forming a display that will correctly position your elements, it is perfectly fine, you should NOT obstruct the html code though by using a table to perform the same tasks that you would use display:table for. The only downside of using css display:table is that a cell can still stretch to fit the content contained within it compared to setting a height and width in a specific div.