tests — block formatting context adjacent to float: using display:table

back to introduction

The same test, but using float:right instead of float:left.

float block
div, in flow, no new block formatting context

paragraph.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat

div, in flow, new block formatting context with display:table

paragraph.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. 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

code

div.tablediv {display:table; background:#ffd4cc;}
p.table-p { background:#ccc; display:table;}
table {background: #daf2e8;}

div#one {float:left; width:100px; height:200px; border:2px solid lime; background:#f1f1f1}

Notes

Last modified: May 24 2010 03:10:37 GMT.