back to introduction
paragraph.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
display:table-cellparagraph.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
paragraph.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
paragraph in flow, no new block formatting context. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
paragraph, in flow, new block formatting context with display:table-cell. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
paragraph, in flow, new block formatting context with display:table-cell. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
a real html table. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat |
div.tablediv {display:table-cell; background:#ffd4cc;}
p.table-p { background:#ccc; display:table-cell;}
table {background: #daf2e8;}
div#one {float:left; width:100px; height:200px; border:2px solid lime; background:#f1f1f1}
display:table-cell is not supported. The browser will drop the content of the block out of its container (positioning the content below the container as an anonymous box, and loose all formatting).display:table-cell is not supported. In order to establish a new block formatting context, elements must gain ’haslayout’ — see On having layout. {zoom:1} is used here. This will not necessarily result in a similar display as more compliant browsers.<div> is moved upwards, placed above the first block of contents. It does establish a new block formatting context however. In the second case, the two paragraphs, WebKit based browser format it as two different table-rows (expected: two cells, side by side).<p>. All browsers with more than reasonable CSS 2.1 support should ignore all margins on the blocks with display:table-cell.Last modified: May 24 2010 03:39:03 GMT.