1) This seems to be a rendering issue specific to Firefox. Setting the vertical-align
property on the divs fixes it. top
, middle
, or bottom
all seem to work. I don't understand myself what FF is doing when there is a height
but no vertical-align
set; it might be a bug.
2) The width and height are honored, but they are subject to table sizing rules. When a table does not have enough room to give each of the cells the width they have specified, it will give more room to cells that have more content. This is what was happening with your example. If you look at my example below, you will see that when the parent element is wider than the sum total of the table cells' widths, the cells respect the width. The height should always work (except in the case of the FF rendering issue I mentioned above).
3) Table cells don't have margins. Use border-spacing and display:table on a parent div.
http://jsfiddle.net/chad/k7esv/3/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…