margin-collapse-clear-011.xht (1043B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Margin Collapsing with Clearance</title> 5 <link rel="author" title="Oriol Brufau" href="obrufau@igalia.com"/> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#flow-control"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats"/> 9 <link rel="match" href="margin-collapse-clear-011-ref.xht"/> 10 <meta name="assert" content="The magenta X appears below the cyan X due to clearance"/> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"/> 12 </head> 13 <body style="font: 25px/1 Ahem"> 14 <div style="margin-bottom: 1em">X</div> 15 <div style="float: left; color: cyan;">X</div> 16 <div style="margin-bottom: 1em; height: 0px;"> 17 <div style="margin-bottom: -1em;"></div> 18 </div> 19 <div style="clear: both; color: magenta">X</div> 20 </body> 21 </html>