What are the problems with displaying: table?

Possible duplicate:
Is there a drawback to using display:table-cell in divs?

I think display: table is an easy way to control the layout of a web page, at least the overall layout. But it seems that it is not widely used. I know that it is not supported or has problems with ie6 and ie7, but for sites that are not trying to be compatible with these browsers, is there any drawback to using display: table?

+4
source share
1 answer

You can think about it in terms of the table element inside html. To answer your question in that sense, yes. Positioning elements with a display: a table in css is more or less a way of forming a tabular display for the correct positioning of an element. This requires less hassle in the path of a floating div and the like. As long as you simply create a display that will correctly position your elements, this is completely normal, you should NOT interfere with the HTML code, although using a table to perform the same tasks that you would use display: table for. The only drawback of using css display: table is that the cell can still be stretched according to the contents contained in it, compared to setting the height and width in a particular div.

0
source

All Articles