tests — new block formatting context adjacent to float: using display:inline-block and display:inline-table

back to introduction

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:inline-block

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

div, in flow, new block formatting context with display:inline-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:inline-block. 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:inline-table. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat


code

div.inline-block-div {display:inline-block; background:#ffd4cc;}
div.inline-table-div {display:inline-table; background:#f2dae3;}

p.inline-block-p { background:#ccc; display:inline-block;}
p.inline-table-p {background: #daf2e8; display:inline-table;}

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

Notes

Last modified: September 10 2009 03:11:01 GMT.